@forumone/throughline 0.0.0 → 1.0.0-next.1
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/CHANGELOG.md +601 -0
- package/LICENSE +21 -0
- package/README.md +352 -0
- package/bin/payload-cli.mjs +443 -0
- package/bin/throughline-payload.mjs +6 -0
- package/dist/access/coreCollections.d.ts +18 -0
- package/dist/access/coreCollections.d.ts.map +1 -0
- package/dist/access/coreCollections.js +56 -0
- package/dist/access/coreCollections.js.map +1 -0
- package/dist/approvals/collection.d.ts +21 -0
- package/dist/approvals/collection.d.ts.map +1 -0
- package/dist/approvals/collection.js +99 -0
- package/dist/approvals/collection.js.map +1 -0
- package/dist/approvals/endpoints/action.d.ts +31 -0
- package/dist/approvals/endpoints/action.d.ts.map +1 -0
- package/dist/approvals/endpoints/action.js +205 -0
- package/dist/approvals/endpoints/action.js.map +1 -0
- package/dist/approvals/index.d.ts +19 -0
- package/dist/approvals/index.d.ts.map +1 -0
- package/dist/approvals/index.js +13 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
- package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
- package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
- package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
- package/dist/approvals/options.d.ts +76 -0
- package/dist/approvals/options.d.ts.map +1 -0
- package/dist/approvals/options.js +47 -0
- package/dist/approvals/options.js.map +1 -0
- package/dist/approvals/plugin.d.ts +4 -0
- package/dist/approvals/plugin.d.ts.map +1 -0
- package/dist/approvals/plugin.js +92 -0
- package/dist/approvals/plugin.js.map +1 -0
- package/dist/approvals/resolver.d.ts +18 -0
- package/dist/approvals/resolver.d.ts.map +1 -0
- package/dist/approvals/resolver.js +57 -0
- package/dist/approvals/resolver.js.map +1 -0
- package/dist/approvals/symbol.d.ts +12 -0
- package/dist/approvals/symbol.d.ts.map +1 -0
- package/dist/approvals/symbol.js +12 -0
- package/dist/approvals/symbol.js.map +1 -0
- package/dist/approvals/tokens.d.ts +48 -0
- package/dist/approvals/tokens.d.ts.map +1 -0
- package/dist/approvals/tokens.js +123 -0
- package/dist/approvals/tokens.js.map +1 -0
- package/dist/approvals/tools/descriptors.d.ts +26 -0
- package/dist/approvals/tools/descriptors.d.ts.map +1 -0
- package/dist/approvals/tools/descriptors.js +35 -0
- package/dist/approvals/tools/descriptors.js.map +1 -0
- package/dist/approvals/tools/get-approval-status.d.ts +11 -0
- package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
- package/dist/approvals/tools/get-approval-status.js +94 -0
- package/dist/approvals/tools/get-approval-status.js.map +1 -0
- package/dist/approvals/tools/index.d.ts +7 -0
- package/dist/approvals/tools/index.d.ts.map +1 -0
- package/dist/approvals/tools/index.js +7 -0
- package/dist/approvals/tools/index.js.map +1 -0
- package/dist/approvals/tools/list-my-requests.d.ts +11 -0
- package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
- package/dist/approvals/tools/list-my-requests.js +55 -0
- package/dist/approvals/tools/list-my-requests.js.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
- package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
- package/dist/approvals/tools/list-pending-approvals.js +53 -0
- package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
- package/dist/approvals/tools/request-approval.d.ts +13 -0
- package/dist/approvals/tools/request-approval.d.ts.map +1 -0
- package/dist/approvals/tools/request-approval.js +123 -0
- package/dist/approvals/tools/request-approval.js.map +1 -0
- package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
- package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
- package/dist/approvals/tools/respond-to-approval.js +98 -0
- package/dist/approvals/tools/respond-to-approval.js.map +1 -0
- package/dist/audit/collection.d.ts +22 -0
- package/dist/audit/collection.d.ts.map +1 -0
- package/dist/audit/collection.js +109 -0
- package/dist/audit/collection.js.map +1 -0
- package/dist/audit/index.d.ts +16 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +11 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
- package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
- package/dist/audit/jobs/audit-event-echo.js +61 -0
- package/dist/audit/jobs/audit-event-echo.js.map +1 -0
- package/dist/audit/plugin.d.ts +20 -0
- package/dist/audit/plugin.d.ts.map +1 -0
- package/dist/audit/plugin.js +55 -0
- package/dist/audit/plugin.js.map +1 -0
- package/dist/audit/query/formatting/index.d.ts +40 -0
- package/dist/audit/query/formatting/index.d.ts.map +1 -0
- package/dist/audit/query/formatting/index.js +73 -0
- package/dist/audit/query/formatting/index.js.map +1 -0
- package/dist/audit/query/options.d.ts +34 -0
- package/dist/audit/query/options.d.ts.map +1 -0
- package/dist/audit/query/options.js +8 -0
- package/dist/audit/query/options.js.map +1 -0
- package/dist/audit/query/plugin.d.ts +11 -0
- package/dist/audit/query/plugin.d.ts.map +1 -0
- package/dist/audit/query/plugin.js +68 -0
- package/dist/audit/query/plugin.js.map +1 -0
- package/dist/audit/query/tools/access.d.ts +9 -0
- package/dist/audit/query/tools/access.d.ts.map +1 -0
- package/dist/audit/query/tools/access.js +14 -0
- package/dist/audit/query/tools/access.js.map +1 -0
- package/dist/audit/query/tools/descriptors.d.ts +26 -0
- package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
- package/dist/audit/query/tools/descriptors.js +35 -0
- package/dist/audit/query/tools/descriptors.js.map +1 -0
- package/dist/audit/query/tools/get-change-history.d.ts +23 -0
- package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
- package/dist/audit/query/tools/get-change-history.js +44 -0
- package/dist/audit/query/tools/get-change-history.js.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
- package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
- package/dist/audit/query/tools/get-recent-failures.js +56 -0
- package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
- package/dist/audit/query/tools/index.d.ts +13 -0
- package/dist/audit/query/tools/index.d.ts.map +1 -0
- package/dist/audit/query/tools/index.js +8 -0
- package/dist/audit/query/tools/index.js.map +1 -0
- package/dist/audit/query/tools/query-audit.d.ts +53 -0
- package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
- package/dist/audit/query/tools/query-audit.js +78 -0
- package/dist/audit/query/tools/query-audit.js.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
- package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
- package/dist/audit/query/tools/what-changed-in-range.js +86 -0
- package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
- package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
- package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
- package/dist/audit/query/tools/who-changed-what.js +66 -0
- package/dist/audit/query/tools/who-changed-what.js.map +1 -0
- package/dist/audit/types.d.ts +11 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +45 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/writer.d.ts +50 -0
- package/dist/audit/writer.d.ts.map +1 -0
- package/dist/audit/writer.js +101 -0
- package/dist/audit/writer.js.map +1 -0
- package/dist/cache-tags.d.ts +31 -0
- package/dist/cache-tags.d.ts.map +1 -0
- package/dist/cache-tags.js +53 -0
- package/dist/cache-tags.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/manifest-source.d.ts +17 -0
- package/dist/components/manifest-source.d.ts.map +1 -0
- package/dist/components/manifest-source.js +60 -0
- package/dist/components/manifest-source.js.map +1 -0
- package/dist/components/matching/index.d.ts +3 -0
- package/dist/components/matching/index.d.ts.map +1 -0
- package/dist/components/matching/index.js +2 -0
- package/dist/components/matching/index.js.map +1 -0
- package/dist/components/matching/tfidf.d.ts +13 -0
- package/dist/components/matching/tfidf.d.ts.map +1 -0
- package/dist/components/matching/tfidf.js +118 -0
- package/dist/components/matching/tfidf.js.map +1 -0
- package/dist/components/matching/types.d.ts +22 -0
- package/dist/components/matching/types.d.ts.map +1 -0
- package/dist/components/matching/types.js +2 -0
- package/dist/components/matching/types.js.map +1 -0
- package/dist/components/options.d.ts +136 -0
- package/dist/components/options.d.ts.map +1 -0
- package/dist/components/options.js +40 -0
- package/dist/components/options.js.map +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/plugin.d.ts.map +1 -0
- package/dist/components/plugin.js +95 -0
- package/dist/components/plugin.js.map +1 -0
- package/dist/components/tools/descriptors.d.ts +34 -0
- package/dist/components/tools/descriptors.d.ts.map +1 -0
- package/dist/components/tools/descriptors.js +43 -0
- package/dist/components/tools/descriptors.js.map +1 -0
- package/dist/components/tools/find-anti-pattern.d.ts +9 -0
- package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
- package/dist/components/tools/find-anti-pattern.js +31 -0
- package/dist/components/tools/find-anti-pattern.js.map +1 -0
- package/dist/components/tools/get-contract.d.ts +4 -0
- package/dist/components/tools/get-contract.d.ts.map +1 -0
- package/dist/components/tools/get-contract.js +19 -0
- package/dist/components/tools/get-contract.js.map +1 -0
- package/dist/components/tools/get-tokens.d.ts +4 -0
- package/dist/components/tools/get-tokens.d.ts.map +1 -0
- package/dist/components/tools/get-tokens.js +19 -0
- package/dist/components/tools/get-tokens.js.map +1 -0
- package/dist/components/tools/get-variants.d.ts +4 -0
- package/dist/components/tools/get-variants.d.ts.map +1 -0
- package/dist/components/tools/get-variants.js +19 -0
- package/dist/components/tools/get-variants.js.map +1 -0
- package/dist/components/tools/index.d.ts +9 -0
- package/dist/components/tools/index.d.ts.map +1 -0
- package/dist/components/tools/index.js +9 -0
- package/dist/components/tools/index.js.map +1 -0
- package/dist/components/tools/list-components.d.ts +4 -0
- package/dist/components/tools/list-components.d.ts.map +1 -0
- package/dist/components/tools/list-components.js +25 -0
- package/dist/components/tools/list-components.js.map +1 -0
- package/dist/components/tools/suggest-for-intent.d.ts +12 -0
- package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
- package/dist/components/tools/suggest-for-intent.js +83 -0
- package/dist/components/tools/suggest-for-intent.js.map +1 -0
- package/dist/components/tools/validate-composition.d.ts +9 -0
- package/dist/components/tools/validate-composition.d.ts.map +1 -0
- package/dist/components/tools/validate-composition.js +31 -0
- package/dist/components/tools/validate-composition.js.map +1 -0
- package/dist/components/validation/composition.d.ts +38 -0
- package/dist/components/validation/composition.d.ts.map +1 -0
- package/dist/components/validation/composition.js +135 -0
- package/dist/components/validation/composition.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
- package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
- package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
- package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
- package/dist/editorial/calendar/ContentCalendarView.js +36 -0
- package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
- package/dist/editorial/calendar/calendar.d.ts +30 -0
- package/dist/editorial/calendar/calendar.d.ts.map +1 -0
- package/dist/editorial/calendar/calendar.js +23 -0
- package/dist/editorial/calendar/calendar.js.map +1 -0
- package/dist/editorial/calendar/find.d.ts +41 -0
- package/dist/editorial/calendar/find.d.ts.map +1 -0
- package/dist/editorial/calendar/find.js +108 -0
- package/dist/editorial/calendar/find.js.map +1 -0
- package/dist/editorial/calendar/month.d.ts +45 -0
- package/dist/editorial/calendar/month.d.ts.map +1 -0
- package/dist/editorial/calendar/month.js +120 -0
- package/dist/editorial/calendar/month.js.map +1 -0
- package/dist/editorial/calendar/tool.d.ts +50 -0
- package/dist/editorial/calendar/tool.d.ts.map +1 -0
- package/dist/editorial/calendar/tool.js +68 -0
- package/dist/editorial/calendar/tool.js.map +1 -0
- package/dist/editorial/config.d.ts +25 -0
- package/dist/editorial/config.d.ts.map +1 -0
- package/dist/editorial/config.js +12 -0
- package/dist/editorial/config.js.map +1 -0
- package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
- package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthReport.js +29 -0
- package/dist/editorial/health/ContentHealthReport.js.map +1 -0
- package/dist/editorial/health/ContentHealthView.d.ts +3 -0
- package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
- package/dist/editorial/health/ContentHealthView.js +29 -0
- package/dist/editorial/health/ContentHealthView.js.map +1 -0
- package/dist/editorial/health/HealthSummary.d.ts +6 -0
- package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
- package/dist/editorial/health/HealthSummary.js +39 -0
- package/dist/editorial/health/HealthSummary.js.map +1 -0
- package/dist/editorial/health/checks.d.ts +104 -0
- package/dist/editorial/health/checks.d.ts.map +1 -0
- package/dist/editorial/health/checks.js +188 -0
- package/dist/editorial/health/checks.js.map +1 -0
- package/dist/editorial/health/find.d.ts +43 -0
- package/dist/editorial/health/find.d.ts.map +1 -0
- package/dist/editorial/health/find.js +97 -0
- package/dist/editorial/health/find.js.map +1 -0
- package/dist/editorial/health/tool.d.ts +53 -0
- package/dist/editorial/health/tool.d.ts.map +1 -0
- package/dist/editorial/health/tool.js +80 -0
- package/dist/editorial/health/tool.js.map +1 -0
- package/dist/editorial/index.d.ts +25 -0
- package/dist/editorial/index.d.ts.map +1 -0
- package/dist/editorial/index.js +15 -0
- package/dist/editorial/index.js.map +1 -0
- package/dist/editorial/palette/CommandPalette.d.ts +15 -0
- package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
- package/dist/editorial/palette/CommandPalette.js +319 -0
- package/dist/editorial/palette/CommandPalette.js.map +1 -0
- package/dist/editorial/palette/ReportsNav.d.ts +5 -0
- package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
- package/dist/editorial/palette/ReportsNav.js +31 -0
- package/dist/editorial/palette/ReportsNav.js.map +1 -0
- package/dist/editorial/palette/search.d.ts +18 -0
- package/dist/editorial/palette/search.d.ts.map +1 -0
- package/dist/editorial/palette/search.js +41 -0
- package/dist/editorial/palette/search.js.map +1 -0
- package/dist/editorial/palette/sources.d.ts +64 -0
- package/dist/editorial/palette/sources.d.ts.map +1 -0
- package/dist/editorial/palette/sources.js +103 -0
- package/dist/editorial/palette/sources.js.map +1 -0
- package/dist/editorial/palette/styles.d.ts +2 -0
- package/dist/editorial/palette/styles.d.ts.map +1 -0
- package/dist/editorial/palette/styles.js +76 -0
- package/dist/editorial/palette/styles.js.map +1 -0
- package/dist/editorial/palette/tool.d.ts +31 -0
- package/dist/editorial/palette/tool.d.ts.map +1 -0
- package/dist/editorial/palette/tool.js +63 -0
- package/dist/editorial/palette/tool.js.map +1 -0
- package/dist/editorial/plugin.d.ts +76 -0
- package/dist/editorial/plugin.d.ts.map +1 -0
- package/dist/editorial/plugin.js +186 -0
- package/dist/editorial/plugin.js.map +1 -0
- package/dist/editorial/relativeTime.d.ts +3 -0
- package/dist/editorial/relativeTime.d.ts.map +1 -0
- package/dist/editorial/relativeTime.js +27 -0
- package/dist/editorial/relativeTime.js.map +1 -0
- package/dist/editorial/styles.d.ts +2 -0
- package/dist/editorial/styles.d.ts.map +1 -0
- package/dist/editorial/styles.js +191 -0
- package/dist/editorial/styles.js.map +1 -0
- package/dist/editorial/work/YourWork.d.ts +13 -0
- package/dist/editorial/work/YourWork.d.ts.map +1 -0
- package/dist/editorial/work/YourWork.js +40 -0
- package/dist/editorial/work/YourWork.js.map +1 -0
- package/dist/editorial/work/tool.d.ts +45 -0
- package/dist/editorial/work/tool.d.ts.map +1 -0
- package/dist/editorial/work/tool.js +54 -0
- package/dist/editorial/work/tool.js.map +1 -0
- package/dist/editorial/work/work.d.ts +31 -0
- package/dist/editorial/work/work.d.ts.map +1 -0
- package/dist/editorial/work/work.js +68 -0
- package/dist/editorial/work/work.js.map +1 -0
- package/dist/email/client.d.ts +78 -0
- package/dist/email/client.d.ts.map +1 -0
- package/dist/email/client.js +63 -0
- package/dist/email/client.js.map +1 -0
- package/dist/email/functions/_shared.d.ts +17 -0
- package/dist/email/functions/_shared.d.ts.map +1 -0
- package/dist/email/functions/_shared.js +40 -0
- package/dist/email/functions/_shared.js.map +1 -0
- package/dist/email/functions/index.d.ts +7 -0
- package/dist/email/functions/index.d.ts.map +1 -0
- package/dist/email/functions/index.js +4 -0
- package/dist/email/functions/index.js.map +1 -0
- package/dist/email/functions/notify-approval-decision.d.ts +34 -0
- package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-decision.js +77 -0
- package/dist/email/functions/notify-approval-decision.js.map +1 -0
- package/dist/email/functions/notify-approval-expired.d.ts +32 -0
- package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-expired.js +54 -0
- package/dist/email/functions/notify-approval-expired.js.map +1 -0
- package/dist/email/functions/notify-approval-request.d.ts +35 -0
- package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
- package/dist/email/functions/notify-approval-request.js +89 -0
- package/dist/email/functions/notify-approval-request.js.map +1 -0
- package/dist/email/index.d.ts +17 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +12 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/options.d.ts +100 -0
- package/dist/email/options.d.ts.map +1 -0
- package/dist/email/options.js +55 -0
- package/dist/email/options.js.map +1 -0
- package/dist/email/plugin.d.ts +28 -0
- package/dist/email/plugin.d.ts.map +1 -0
- package/dist/email/plugin.js +113 -0
- package/dist/email/plugin.js.map +1 -0
- package/dist/email/templates/ApprovalDecision.d.ts +15 -0
- package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
- package/dist/email/templates/ApprovalDecision.js +56 -0
- package/dist/email/templates/ApprovalDecision.js.map +1 -0
- package/dist/email/templates/ApprovalExpired.d.ts +10 -0
- package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
- package/dist/email/templates/ApprovalExpired.js +8 -0
- package/dist/email/templates/ApprovalExpired.js.map +1 -0
- package/dist/email/templates/ApprovalRequest.d.ts +24 -0
- package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
- package/dist/email/templates/ApprovalRequest.js +58 -0
- package/dist/email/templates/ApprovalRequest.js.map +1 -0
- package/dist/email/templates/_layout.d.ts +17 -0
- package/dist/email/templates/_layout.d.ts.map +1 -0
- package/dist/email/templates/_layout.js +39 -0
- package/dist/email/templates/_layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +9 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +5 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/tokens.d.ts +39 -0
- package/dist/email/tokens.d.ts.map +1 -0
- package/dist/email/tokens.js +17 -0
- package/dist/email/tokens.js.map +1 -0
- package/dist/env/index.d.ts +54 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +113 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/inngest.d.ts +24 -0
- package/dist/events/inngest.d.ts.map +1 -0
- package/dist/events/inngest.js +24 -0
- package/dist/events/inngest.js.map +1 -0
- package/dist/events/taxonomy.d.ts +84 -0
- package/dist/events/taxonomy.d.ts.map +1 -0
- package/dist/events/taxonomy.js +10 -0
- package/dist/events/taxonomy.js.map +1 -0
- package/dist/events/vercel.d.ts +47 -0
- package/dist/events/vercel.d.ts.map +1 -0
- package/dist/events/vercel.js +69 -0
- package/dist/events/vercel.js.map +1 -0
- package/dist/exports/client.d.ts +24 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +21 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +17 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +19 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/CharacterCountField.d.ts +4 -0
- package/dist/fields/CharacterCountField.d.ts.map +1 -0
- package/dist/fields/CharacterCountField.js +94 -0
- package/dist/fields/CharacterCountField.js.map +1 -0
- package/dist/fields/characterCount.d.ts +15 -0
- package/dist/fields/characterCount.d.ts.map +1 -0
- package/dist/fields/characterCount.js +92 -0
- package/dist/fields/characterCount.js.map +1 -0
- package/dist/fields/checkSlug.d.ts +62 -0
- package/dist/fields/checkSlug.d.ts.map +1 -0
- package/dist/fields/checkSlug.js +119 -0
- package/dist/fields/checkSlug.js.map +1 -0
- package/dist/fields/index.d.ts +9 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.js +9 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/fields/mapFields.d.ts +13 -0
- package/dist/fields/mapFields.d.ts.map +1 -0
- package/dist/fields/mapFields.js +32 -0
- package/dist/fields/mapFields.js.map +1 -0
- package/dist/fields/publishing.d.ts +33 -0
- package/dist/fields/publishing.d.ts.map +1 -0
- package/dist/fields/publishing.js +81 -0
- package/dist/fields/publishing.js.map +1 -0
- package/dist/fields/revisedAt.d.ts +15 -0
- package/dist/fields/revisedAt.d.ts.map +1 -0
- package/dist/fields/revisedAt.js +79 -0
- package/dist/fields/revisedAt.js.map +1 -0
- package/dist/fields/slug.d.ts +21 -0
- package/dist/fields/slug.d.ts.map +1 -0
- package/dist/fields/slug.js +102 -0
- package/dist/fields/slug.js.map +1 -0
- package/dist/fields/unlisted.d.ts +13 -0
- package/dist/fields/unlisted.d.ts.map +1 -0
- package/dist/fields/unlisted.js +35 -0
- package/dist/fields/unlisted.js.map +1 -0
- package/dist/fields/usedBy.d.ts +12 -0
- package/dist/fields/usedBy.d.ts.map +1 -0
- package/dist/fields/usedBy.js +36 -0
- package/dist/fields/usedBy.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/admin/SyncButton.d.ts +27 -0
- package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
- package/dist/integrations/admin/SyncButton.js +134 -0
- package/dist/integrations/admin/SyncButton.js.map +1 -0
- package/dist/integrations/admin/sync-client.d.ts +83 -0
- package/dist/integrations/admin/sync-client.d.ts.map +1 -0
- package/dist/integrations/admin/sync-client.js +121 -0
- package/dist/integrations/admin/sync-client.js.map +1 -0
- package/dist/integrations/collection.d.ts +26 -0
- package/dist/integrations/collection.d.ts.map +1 -0
- package/dist/integrations/collection.js +193 -0
- package/dist/integrations/collection.js.map +1 -0
- package/dist/integrations/endpoints/sync.d.ts +27 -0
- package/dist/integrations/endpoints/sync.d.ts.map +1 -0
- package/dist/integrations/endpoints/sync.js +90 -0
- package/dist/integrations/endpoints/sync.js.map +1 -0
- package/dist/integrations/index.d.ts +22 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +15 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/index.d.ts +3 -0
- package/dist/integrations/integrations/index.d.ts.map +1 -0
- package/dist/integrations/integrations/index.js +2 -0
- package/dist/integrations/integrations/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
- package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/config-fields.js +54 -0
- package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
- package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
- package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/functions.js +139 -0
- package/dist/integrations/integrations/webhook/functions.js.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
- package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
- package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
- package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/hmac.js +25 -0
- package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
- package/dist/integrations/integrations/webhook/index.d.ts +6 -0
- package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/index.js +47 -0
- package/dist/integrations/integrations/webhook/index.js.map +1 -0
- package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
- package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
- package/dist/integrations/integrations/webhook/payload.js +19 -0
- package/dist/integrations/integrations/webhook/payload.js.map +1 -0
- package/dist/integrations/jobs/healthcheck.d.ts +24 -0
- package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
- package/dist/integrations/jobs/healthcheck.js +133 -0
- package/dist/integrations/jobs/healthcheck.js.map +1 -0
- package/dist/integrations/options.d.ts +54 -0
- package/dist/integrations/options.d.ts.map +1 -0
- package/dist/integrations/options.js +8 -0
- package/dist/integrations/options.js.map +1 -0
- package/dist/integrations/plugin.d.ts +51 -0
- package/dist/integrations/plugin.d.ts.map +1 -0
- package/dist/integrations/plugin.js +215 -0
- package/dist/integrations/plugin.js.map +1 -0
- package/dist/integrations/registry.d.ts +27 -0
- package/dist/integrations/registry.d.ts.map +1 -0
- package/dist/integrations/registry.js +39 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/integrations/sync/manual-sync.d.ts +70 -0
- package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
- package/dist/integrations/sync/manual-sync.js +91 -0
- package/dist/integrations/sync/manual-sync.js.map +1 -0
- package/dist/integrations/sync/problems.d.ts +31 -0
- package/dist/integrations/sync/problems.d.ts.map +1 -0
- package/dist/integrations/sync/problems.js +40 -0
- package/dist/integrations/sync/problems.js.map +1 -0
- package/dist/integrations/sync/status.d.ts +15 -0
- package/dist/integrations/sync/status.d.ts.map +1 -0
- package/dist/integrations/sync/status.js +31 -0
- package/dist/integrations/sync/status.js.map +1 -0
- package/dist/integrations/tools/access.d.ts +5 -0
- package/dist/integrations/tools/access.d.ts.map +1 -0
- package/dist/integrations/tools/access.js +14 -0
- package/dist/integrations/tools/access.js.map +1 -0
- package/dist/integrations/tools/descriptors.d.ts +26 -0
- package/dist/integrations/tools/descriptors.d.ts.map +1 -0
- package/dist/integrations/tools/descriptors.js +35 -0
- package/dist/integrations/tools/descriptors.js.map +1 -0
- package/dist/integrations/tools/get-integration-status.d.ts +17 -0
- package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
- package/dist/integrations/tools/get-integration-status.js +41 -0
- package/dist/integrations/tools/get-integration-status.js.map +1 -0
- package/dist/integrations/tools/index.d.ts +13 -0
- package/dist/integrations/tools/index.d.ts.map +1 -0
- package/dist/integrations/tools/index.js +8 -0
- package/dist/integrations/tools/index.js.map +1 -0
- package/dist/integrations/tools/list-integration-types.d.ts +10 -0
- package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
- package/dist/integrations/tools/list-integration-types.js +22 -0
- package/dist/integrations/tools/list-integration-types.js.map +1 -0
- package/dist/integrations/tools/list-integrations.d.ts +20 -0
- package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
- package/dist/integrations/tools/list-integrations.js +49 -0
- package/dist/integrations/tools/list-integrations.js.map +1 -0
- package/dist/integrations/tools/test-integration.d.ts +19 -0
- package/dist/integrations/tools/test-integration.d.ts.map +1 -0
- package/dist/integrations/tools/test-integration.js +51 -0
- package/dist/integrations/tools/test-integration.js.map +1 -0
- package/dist/integrations/tools/trigger-sync.d.ts +26 -0
- package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
- package/dist/integrations/tools/trigger-sync.js +44 -0
- package/dist/integrations/tools/trigger-sync.js.map +1 -0
- package/dist/integrations/types.d.ts +183 -0
- package/dist/integrations/types.d.ts.map +1 -0
- package/dist/integrations/types.js +2 -0
- package/dist/integrations/types.js.map +1 -0
- package/dist/jobs/define.d.ts +17 -0
- package/dist/jobs/define.d.ts.map +1 -0
- package/dist/jobs/define.js +39 -0
- package/dist/jobs/define.js.map +1 -0
- package/dist/jobs/failure-handler.d.ts +39 -0
- package/dist/jobs/failure-handler.d.ts.map +1 -0
- package/dist/jobs/failure-handler.js +62 -0
- package/dist/jobs/failure-handler.js.map +1 -0
- package/dist/jobs/index.d.ts +28 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +7 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/inngest/adapter.d.ts +39 -0
- package/dist/jobs/inngest/adapter.d.ts.map +1 -0
- package/dist/jobs/inngest/adapter.js +81 -0
- package/dist/jobs/inngest/adapter.js.map +1 -0
- package/dist/jobs/inngest/index.d.ts +15 -0
- package/dist/jobs/inngest/index.d.ts.map +1 -0
- package/dist/jobs/inngest/index.js +13 -0
- package/dist/jobs/inngest/index.js.map +1 -0
- package/dist/jobs/options.d.ts +18 -0
- package/dist/jobs/options.d.ts.map +1 -0
- package/dist/jobs/options.js +12 -0
- package/dist/jobs/options.js.map +1 -0
- package/dist/jobs/payload/adapter.d.ts +33 -0
- package/dist/jobs/payload/adapter.d.ts.map +1 -0
- package/dist/jobs/payload/adapter.js +257 -0
- package/dist/jobs/payload/adapter.js.map +1 -0
- package/dist/jobs/payload/index.d.ts +8 -0
- package/dist/jobs/payload/index.d.ts.map +1 -0
- package/dist/jobs/payload/index.js +7 -0
- package/dist/jobs/payload/index.js.map +1 -0
- package/dist/jobs/sender.d.ts +4 -0
- package/dist/jobs/sender.d.ts.map +1 -0
- package/dist/jobs/sender.js +19 -0
- package/dist/jobs/sender.js.map +1 -0
- package/dist/jobs/types.d.ts +105 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/workflow-types.d.ts +280 -0
- package/dist/jobs/workflow-types.d.ts.map +1 -0
- package/dist/jobs/workflow-types.js +22 -0
- package/dist/jobs/workflow-types.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/mcp/api-key-access.d.ts +50 -0
- package/dist/mcp/api-key-access.d.ts.map +1 -0
- package/dist/mcp/api-key-access.js +94 -0
- package/dist/mcp/api-key-access.js.map +1 -0
- package/dist/mcp/audit-context.d.ts +39 -0
- package/dist/mcp/audit-context.d.ts.map +1 -0
- package/dist/mcp/audit-context.js +36 -0
- package/dist/mcp/audit-context.js.map +1 -0
- package/dist/mcp/audit-server.d.ts +13 -0
- package/dist/mcp/audit-server.d.ts.map +1 -0
- package/dist/mcp/audit-server.js +68 -0
- package/dist/mcp/audit-server.js.map +1 -0
- package/dist/mcp/collector.d.ts +51 -0
- package/dist/mcp/collector.d.ts.map +1 -0
- package/dist/mcp/collector.js +96 -0
- package/dist/mcp/collector.js.map +1 -0
- package/dist/mcp/envelope.d.ts +22 -0
- package/dist/mcp/envelope.d.ts.map +1 -0
- package/dist/mcp/envelope.js +22 -0
- package/dist/mcp/envelope.js.map +1 -0
- package/dist/mcp/index.d.ts +12 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/meta.d.ts +74 -0
- package/dist/mcp/meta.d.ts.map +1 -0
- package/dist/mcp/meta.js +27 -0
- package/dist/mcp/meta.js.map +1 -0
- package/dist/mcp/payload-mcp.d.ts +68 -0
- package/dist/mcp/payload-mcp.d.ts.map +1 -0
- package/dist/mcp/payload-mcp.js +175 -0
- package/dist/mcp/payload-mcp.js.map +1 -0
- package/dist/media/hooks.d.ts +70 -0
- package/dist/media/hooks.d.ts.map +1 -0
- package/dist/media/hooks.js +200 -0
- package/dist/media/hooks.js.map +1 -0
- package/dist/media/index.d.ts +8 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +7 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/svg.d.ts +17 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +241 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/media/uploadKey.d.ts +25 -0
- package/dist/media/uploadKey.d.ts.map +1 -0
- package/dist/media/uploadKey.js +70 -0
- package/dist/media/uploadKey.js.map +1 -0
- package/dist/observability/collection.d.ts +13 -0
- package/dist/observability/collection.d.ts.map +1 -0
- package/dist/observability/collection.js +76 -0
- package/dist/observability/collection.js.map +1 -0
- package/dist/observability/index.d.ts +10 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +6 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/plugin.d.ts +24 -0
- package/dist/observability/plugin.d.ts.map +1 -0
- package/dist/observability/plugin.js +59 -0
- package/dist/observability/plugin.js.map +1 -0
- package/dist/observability/report.d.ts +175 -0
- package/dist/observability/report.d.ts.map +1 -0
- package/dist/observability/report.js +274 -0
- package/dist/observability/report.js.map +1 -0
- package/dist/observability/tool.d.ts +33 -0
- package/dist/observability/tool.d.ts.map +1 -0
- package/dist/observability/tool.js +75 -0
- package/dist/observability/tool.js.map +1 -0
- package/dist/observability/writer.d.ts +24 -0
- package/dist/observability/writer.d.ts.map +1 -0
- package/dist/observability/writer.js +72 -0
- package/dist/observability/writer.js.map +1 -0
- package/dist/plugin-contract/admin.d.ts +45 -0
- package/dist/plugin-contract/admin.d.ts.map +1 -0
- package/dist/plugin-contract/admin.js +12 -0
- package/dist/plugin-contract/admin.js.map +1 -0
- package/dist/plugin-contract/env.d.ts +29 -0
- package/dist/plugin-contract/env.d.ts.map +1 -0
- package/dist/plugin-contract/env.js +2 -0
- package/dist/plugin-contract/env.js.map +1 -0
- package/dist/plugin-contract/index.d.ts +39 -0
- package/dist/plugin-contract/index.d.ts.map +1 -0
- package/dist/plugin-contract/index.js +5 -0
- package/dist/plugin-contract/index.js.map +1 -0
- package/dist/plugin-contract/mcp.d.ts +51 -0
- package/dist/plugin-contract/mcp.d.ts.map +1 -0
- package/dist/plugin-contract/mcp.js +2 -0
- package/dist/plugin-contract/mcp.js.map +1 -0
- package/dist/plugin-contract/registry.d.ts +23 -0
- package/dist/plugin-contract/registry.d.ts.map +1 -0
- package/dist/plugin-contract/registry.js +51 -0
- package/dist/plugin-contract/registry.js.map +1 -0
- package/dist/publishing/admin/PublishButton.d.ts +22 -0
- package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/PublishButton.js +164 -0
- package/dist/publishing/admin/PublishButton.js.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
- package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
- package/dist/publishing/admin/SchedulePublishField.js +160 -0
- package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
- package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
- package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
- package/dist/publishing/admin/UnpublishButton.js +90 -0
- package/dist/publishing/admin/UnpublishButton.js.map +1 -0
- package/dist/publishing/admin/publishing-client.d.ts +105 -0
- package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
- package/dist/publishing/admin/publishing-client.js +139 -0
- package/dist/publishing/admin/publishing-client.js.map +1 -0
- package/dist/publishing/admin/schedule-state.d.ts +30 -0
- package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
- package/dist/publishing/admin/schedule-state.js +39 -0
- package/dist/publishing/admin/schedule-state.js.map +1 -0
- package/dist/publishing/checks/alt-text.d.ts +17 -0
- package/dist/publishing/checks/alt-text.d.ts.map +1 -0
- package/dist/publishing/checks/alt-text.js +63 -0
- package/dist/publishing/checks/alt-text.js.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
- package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
- package/dist/publishing/checks/heading-hierarchy.js +32 -0
- package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
- package/dist/publishing/checks/index.d.ts +6 -0
- package/dist/publishing/checks/index.d.ts.map +1 -0
- package/dist/publishing/checks/index.js +13 -0
- package/dist/publishing/checks/index.js.map +1 -0
- package/dist/publishing/checks/link-labels.d.ts +9 -0
- package/dist/publishing/checks/link-labels.d.ts.map +1 -0
- package/dist/publishing/checks/link-labels.js +44 -0
- package/dist/publishing/checks/link-labels.js.map +1 -0
- package/dist/publishing/endpoints/admin.d.ts +19 -0
- package/dist/publishing/endpoints/admin.d.ts.map +1 -0
- package/dist/publishing/endpoints/admin.js +112 -0
- package/dist/publishing/endpoints/admin.js.map +1 -0
- package/dist/publishing/events.d.ts +16 -0
- package/dist/publishing/events.d.ts.map +1 -0
- package/dist/publishing/events.js +30 -0
- package/dist/publishing/events.js.map +1 -0
- package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
- package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/block-status-writes.js +242 -0
- package/dist/publishing/hooks/block-status-writes.js.map +1 -0
- package/dist/publishing/hooks/draft-writes.d.ts +32 -0
- package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
- package/dist/publishing/hooks/draft-writes.js +76 -0
- package/dist/publishing/hooks/draft-writes.js.map +1 -0
- package/dist/publishing/hooks/schedule-events.d.ts +26 -0
- package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
- package/dist/publishing/hooks/schedule-events.js +54 -0
- package/dist/publishing/hooks/schedule-events.js.map +1 -0
- package/dist/publishing/index.d.ts +35 -0
- package/dist/publishing/index.d.ts.map +1 -0
- package/dist/publishing/index.js +32 -0
- package/dist/publishing/index.js.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
- package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
- package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
- package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
- package/dist/publishing/jobs/next-revalidate.js +42 -0
- package/dist/publishing/jobs/next-revalidate.js.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
- package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
- package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
- package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
- package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
- package/dist/publishing/options.d.ts +100 -0
- package/dist/publishing/options.d.ts.map +1 -0
- package/dist/publishing/options.js +56 -0
- package/dist/publishing/options.js.map +1 -0
- package/dist/publishing/pipeline/index.d.ts +20 -0
- package/dist/publishing/pipeline/index.d.ts.map +1 -0
- package/dist/publishing/pipeline/index.js +88 -0
- package/dist/publishing/pipeline/index.js.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
- package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/accessibility.js +37 -0
- package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
- package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
- package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/approval.js +54 -0
- package/dist/publishing/pipeline/steps/approval.js.map +1 -0
- package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
- package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/composition.js +63 -0
- package/dist/publishing/pipeline/steps/composition.js.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
- package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/embargo.js +41 -0
- package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
- package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
- package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/execute.js +161 -0
- package/dist/publishing/pipeline/steps/execute.js.map +1 -0
- package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
- package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/exist.js +31 -0
- package/dist/publishing/pipeline/steps/exist.js.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
- package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
- package/dist/publishing/pipeline/steps/required-fields.js +63 -0
- package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
- package/dist/publishing/pipeline/types.d.ts +72 -0
- package/dist/publishing/pipeline/types.d.ts.map +1 -0
- package/dist/publishing/pipeline/types.js +2 -0
- package/dist/publishing/pipeline/types.js.map +1 -0
- package/dist/publishing/plugin.d.ts +4 -0
- package/dist/publishing/plugin.d.ts.map +1 -0
- package/dist/publishing/plugin.js +196 -0
- package/dist/publishing/plugin.js.map +1 -0
- package/dist/publishing/service.d.ts +149 -0
- package/dist/publishing/service.d.ts.map +1 -0
- package/dist/publishing/service.js +474 -0
- package/dist/publishing/service.js.map +1 -0
- package/dist/publishing/tools/actor.d.ts +32 -0
- package/dist/publishing/tools/actor.d.ts.map +1 -0
- package/dist/publishing/tools/actor.js +40 -0
- package/dist/publishing/tools/actor.js.map +1 -0
- package/dist/publishing/tools/descriptors.d.ts +26 -0
- package/dist/publishing/tools/descriptors.d.ts.map +1 -0
- package/dist/publishing/tools/descriptors.js +38 -0
- package/dist/publishing/tools/descriptors.js.map +1 -0
- package/dist/publishing/tools/get-publish-status.d.ts +12 -0
- package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
- package/dist/publishing/tools/get-publish-status.js +45 -0
- package/dist/publishing/tools/get-publish-status.js.map +1 -0
- package/dist/publishing/tools/index.d.ts +7 -0
- package/dist/publishing/tools/index.d.ts.map +1 -0
- package/dist/publishing/tools/index.js +7 -0
- package/dist/publishing/tools/index.js.map +1 -0
- package/dist/publishing/tools/publish.d.ts +14 -0
- package/dist/publishing/tools/publish.d.ts.map +1 -0
- package/dist/publishing/tools/publish.js +35 -0
- package/dist/publishing/tools/publish.js.map +1 -0
- package/dist/publishing/tools/rollback.d.ts +11 -0
- package/dist/publishing/tools/rollback.d.ts.map +1 -0
- package/dist/publishing/tools/rollback.js +98 -0
- package/dist/publishing/tools/rollback.js.map +1 -0
- package/dist/publishing/tools/schedule-publish.d.ts +20 -0
- package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
- package/dist/publishing/tools/schedule-publish.js +49 -0
- package/dist/publishing/tools/schedule-publish.js.map +1 -0
- package/dist/publishing/tools/unpublish.d.ts +14 -0
- package/dist/publishing/tools/unpublish.d.ts.map +1 -0
- package/dist/publishing/tools/unpublish.js +29 -0
- package/dist/publishing/tools/unpublish.js.map +1 -0
- package/dist/references/UsedOnPanel.d.ts +3 -0
- package/dist/references/UsedOnPanel.d.ts.map +1 -0
- package/dist/references/UsedOnPanel.js +47 -0
- package/dist/references/UsedOnPanel.js.map +1 -0
- package/dist/references/find.d.ts +46 -0
- package/dist/references/find.d.ts.map +1 -0
- package/dist/references/find.js +142 -0
- package/dist/references/find.js.map +1 -0
- package/dist/references/guards.d.ts +32 -0
- package/dist/references/guards.d.ts.map +1 -0
- package/dist/references/guards.js +76 -0
- package/dist/references/guards.js.map +1 -0
- package/dist/references/index.d.ts +11 -0
- package/dist/references/index.d.ts.map +1 -0
- package/dist/references/index.js +6 -0
- package/dist/references/index.js.map +1 -0
- package/dist/references/plugin.d.ts +51 -0
- package/dist/references/plugin.d.ts.map +1 -0
- package/dist/references/plugin.js +111 -0
- package/dist/references/plugin.js.map +1 -0
- package/dist/references/tools.d.ts +54 -0
- package/dist/references/tools.d.ts.map +1 -0
- package/dist/references/tools.js +124 -0
- package/dist/references/tools.js.map +1 -0
- package/dist/references/walk.d.ts +43 -0
- package/dist/references/walk.d.ts.map +1 -0
- package/dist/references/walk.js +214 -0
- package/dist/references/walk.js.map +1 -0
- package/dist/testing/anonymousAccess.d.ts +111 -0
- package/dist/testing/anonymousAccess.d.ts.map +1 -0
- package/dist/testing/anonymousAccess.js +185 -0
- package/dist/testing/anonymousAccess.js.map +1 -0
- package/dist/testing/describeAnonymousAccess.d.ts +26 -0
- package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
- package/dist/testing/describeAnonymousAccess.js +76 -0
- package/dist/testing/describeAnonymousAccess.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/utils/content-hash.d.ts +31 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +94 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/relationships.d.ts +17 -0
- package/dist/utils/relationships.d.ts.map +1 -0
- package/dist/utils/relationships.js +26 -0
- package/dist/utils/relationships.js.map +1 -0
- package/dist/utils/sha256.d.ts +10 -0
- package/dist/utils/sha256.d.ts.map +1 -0
- package/dist/utils/sha256.js +16 -0
- package/dist/utils/sha256.js.map +1 -0
- package/dist/utils/zod-issues.d.ts +19 -0
- package/dist/utils/zod-issues.d.ts.map +1 -0
- package/dist/utils/zod-issues.js +22 -0
- package/dist/utils/zod-issues.js.map +1 -0
- package/package.json +183 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a fire-and-forget audit writer. The writer never throws — failures
|
|
3
|
+
* log via `options.logger` (or `console`). Audit failures must not break
|
|
4
|
+
* the originating action.
|
|
5
|
+
*
|
|
6
|
+
* If `inngest` is provided the writer also fires an `audit/event.recorded`
|
|
7
|
+
* event so subscribers (email, integrations, healthchecks) can react.
|
|
8
|
+
*/
|
|
9
|
+
export function createAuditWriter(options) {
|
|
10
|
+
const { payload, inngest, collectionSlug = 'audit-events', logger } = options;
|
|
11
|
+
return async function recordAuditEvent(event) {
|
|
12
|
+
try {
|
|
13
|
+
const summary = event.summary ?? generateSummary(event);
|
|
14
|
+
const created = await payload.create({
|
|
15
|
+
collection: collectionSlug,
|
|
16
|
+
data: stripUndefined({
|
|
17
|
+
createdAt: new Date().toISOString(),
|
|
18
|
+
actor: stripUndefined({ ...event.actor }),
|
|
19
|
+
action: event.action,
|
|
20
|
+
mcpServer: event.mcpServer,
|
|
21
|
+
mcpTool: event.mcpTool,
|
|
22
|
+
targetCollection: event.targetCollection,
|
|
23
|
+
targetId: event.targetId,
|
|
24
|
+
targetTitle: event.targetTitle,
|
|
25
|
+
prompt: event.prompt,
|
|
26
|
+
reasoning: event.reasoning,
|
|
27
|
+
changesSummary: event.changesSummary,
|
|
28
|
+
summary,
|
|
29
|
+
diff: event.diff ?? null,
|
|
30
|
+
success: event.success ?? true,
|
|
31
|
+
errorMessage: event.errorMessage,
|
|
32
|
+
approvalRequestId: event.approvalRequestId,
|
|
33
|
+
integrationId: event.integrationId,
|
|
34
|
+
}),
|
|
35
|
+
});
|
|
36
|
+
if (inngest) {
|
|
37
|
+
try {
|
|
38
|
+
await inngest.send({
|
|
39
|
+
name: 'audit/event.recorded',
|
|
40
|
+
data: stripUndefined({
|
|
41
|
+
auditEventId: String(created.id),
|
|
42
|
+
action: event.action,
|
|
43
|
+
actorId: event.actor.userId,
|
|
44
|
+
targetCollection: event.targetCollection,
|
|
45
|
+
targetId: event.targetId,
|
|
46
|
+
approvalRequestId: event.approvalRequestId,
|
|
47
|
+
integrationId: event.integrationId,
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
catch (eventError) {
|
|
52
|
+
logger?.warn('Audit Inngest event send failed', { error: String(eventError) });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (writeError) {
|
|
57
|
+
logger?.error('Audit event write failed', {
|
|
58
|
+
error: String(writeError),
|
|
59
|
+
action: event.action,
|
|
60
|
+
targetCollection: event.targetCollection,
|
|
61
|
+
targetId: event.targetId,
|
|
62
|
+
});
|
|
63
|
+
// Intentionally swallowed: never let audit failures break the original action.
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const SUMMARY_TEMPLATES = {
|
|
68
|
+
'content.update': (e) => `Updated ${e.targetTitle ?? e.targetId ?? '(unknown)'} in ${e.targetCollection ?? '(unknown)'}`,
|
|
69
|
+
'content.create': (e) => `Created ${e.targetTitle ?? e.targetId ?? '(unknown)'} in ${e.targetCollection ?? '(unknown)'}`,
|
|
70
|
+
'content.delete': (e) => `Deleted ${e.targetTitle ?? e.targetId ?? '(unknown)'} from ${e.targetCollection ?? '(unknown)'}`,
|
|
71
|
+
'content.find': (e) => `Queried ${e.targetCollection ?? '(unknown)'}`,
|
|
72
|
+
'design.suggest': (e) => `Searched for components matching: ${e.prompt?.slice(0, 80) ?? 'an intent'}`,
|
|
73
|
+
'design.validate': () => 'Validated a composition',
|
|
74
|
+
'design.get_contract': (e) => `Fetched contract for ${e.targetTitle ?? '(a component)'}`,
|
|
75
|
+
'publishing.publish': (e) => `Published ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
76
|
+
'publishing.unpublish': (e) => `Unpublished ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
77
|
+
'publishing.schedule': (e) => `Scheduled publish for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
78
|
+
'publishing.rollback': (e) => `Rolled back ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
79
|
+
'approval.requested': (e) => `Requested approval for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
80
|
+
'approval.granted': (e) => `Granted approval for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
81
|
+
'approval.declined': (e) => `Declined approval for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
82
|
+
'approval.expired': (e) => `Approval expired for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
83
|
+
'form.submission_received': (e) => `Form submission received for ${e.targetTitle ?? e.targetId ?? '(unknown)'}`,
|
|
84
|
+
'integration.synced': (e) => `Synced ${e.integrationId ?? '(unknown integration)'}`,
|
|
85
|
+
'integration.failed': (e) => `Integration failed: ${e.integrationId ?? '(unknown integration)'}`,
|
|
86
|
+
};
|
|
87
|
+
function generateSummary(event) {
|
|
88
|
+
const template = SUMMARY_TEMPLATES[event.action];
|
|
89
|
+
if (template)
|
|
90
|
+
return template(event);
|
|
91
|
+
return `${event.action} (${event.mcpServer}:${event.mcpTool})`;
|
|
92
|
+
}
|
|
93
|
+
function stripUndefined(obj) {
|
|
94
|
+
const out = {};
|
|
95
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
96
|
+
if (value !== undefined)
|
|
97
|
+
out[key] = value;
|
|
98
|
+
}
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../../src/audit/writer.ts"],"names":[],"mappings":"AA0CA;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA2B;IAC3D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAE7E,OAAO,KAAK,UAAU,gBAAgB,CAAC,KAAsB;QAC3D,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAA;YAEvD,MAAM,OAAO,GAAG,MAAM,OAAO,C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,CAAC,CAAC,QAAQ,IAAI,WAAW,EAAE;IAC9E,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,aAAa,IAAI,uBAAuB,EAAE;IACnF,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,aAAa,IAAI,uBAAuB,EAAE;CACjG,CAAA;AAED,SAAS,eAAe,CAAC,KAAsB;IAC7C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAChD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;IACpC,OAAO,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,GAAG,CAAA;AAChE,CAAC;AAED,SAAS,cAAc,CAAoC,GAAM;IAC/D,MAAM,GAAG,GAA4B,EAAE,CAAA;IACvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IAC3C,CAAC;IACD,OAAO,GAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** How a site names its tags. Each builder is optional; omitted ones use the default. */
|
|
2
|
+
export interface CacheTagScheme {
|
|
3
|
+
/**
|
|
4
|
+
* The tag for cached reads derived from a collection's documents.
|
|
5
|
+
* Default: the bare slug (`pages`), which is also what
|
|
6
|
+
* `revalidateOnPublishJob` has always fired.
|
|
7
|
+
*/
|
|
8
|
+
collection?: (slug: string) => string;
|
|
9
|
+
/** The tag for a cached global. Default: `global_<slug>`. */
|
|
10
|
+
global?: (slug: string) => string;
|
|
11
|
+
}
|
|
12
|
+
/** The built scheme. Pass the same instance to writers and readers. */
|
|
13
|
+
export interface CacheTags {
|
|
14
|
+
collection(slug: string): string;
|
|
15
|
+
global(slug: string): string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds the tag scheme both ends of the cache use.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* // src/lib/cache-tags.ts — imported by payload.config.ts and by readers
|
|
22
|
+
* export const cacheTags = createCacheTags()
|
|
23
|
+
*
|
|
24
|
+
* // a reader
|
|
25
|
+
* unstable_cache(load, ['navigation'], { tags: [cacheTags.global('navigation')] })
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function createCacheTags(scheme?: CacheTagScheme): CacheTags;
|
|
29
|
+
/** The scheme every writer uses when it is given none. */
|
|
30
|
+
export declare const defaultCacheTags: CacheTags;
|
|
31
|
+
//# sourceMappingURL=cache-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-tags.d.ts","sourceRoot":"","sources":["../src/cache-tags.ts"],"names":[],"mappings":"AAqBA,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACrC,6DAA6D;IAC7D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CAClC;AAED,uEAAuE;AACvE,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,cAAmB,GAAG,SAAS,CAOtE;AAED,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,SAA6B,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Next cache tags, named in one place.
|
|
3
|
+
|
|
4
|
+
A tag is one string with two ends: the reader that caches under it
|
|
5
|
+
(`unstable_cache(..., { tags })`, `cacheTag()`, `fetch(..., { next: { tags } })`)
|
|
6
|
+
and the writer that drops it (the hooks in `revalidate-tag-hooks.ts`, and
|
|
7
|
+
`revalidateOnPublishJob`). Nothing in the type system connects the two
|
|
8
|
+
ends. Name them differently and everything compiles, every test passes, the hook
|
|
9
|
+
runs, and the page never refreshes — the first site on this suite shipped a hook
|
|
10
|
+
that had never invalidated anything for exactly that reason.
|
|
11
|
+
|
|
12
|
+
So both ends build tags from one object. A site makes it once, in a module its
|
|
13
|
+
`payload.config.ts` and its frontend both import, and hands it to the hooks and
|
|
14
|
+
the readers alike.
|
|
15
|
+
|
|
16
|
+
Deliberately dependency-free, and published on its own subpath
|
|
17
|
+
(`@forumone/throughline/cache-tags`): one of its importers is
|
|
18
|
+
`payload.config.ts` and the other is frontend code, and neither should pull in
|
|
19
|
+
the other's world to name a string.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Builds the tag scheme both ends of the cache use.
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* // src/lib/cache-tags.ts — imported by payload.config.ts and by readers
|
|
26
|
+
* export const cacheTags = createCacheTags()
|
|
27
|
+
*
|
|
28
|
+
* // a reader
|
|
29
|
+
* unstable_cache(load, ['navigation'], { tags: [cacheTags.global('navigation')] })
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function createCacheTags(scheme = {}) {
|
|
33
|
+
const collection = scheme.collection ?? ((slug) => slug);
|
|
34
|
+
const global = scheme.global ?? ((slug) => `global_${slug}`);
|
|
35
|
+
return {
|
|
36
|
+
collection: (slug) => nonEmpty(collection(slug), 'collection', slug),
|
|
37
|
+
global: (slug) => nonEmpty(global(slug), 'global', slug),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** The scheme every writer uses when it is given none. */
|
|
41
|
+
export const defaultCacheTags = createCacheTags();
|
|
42
|
+
/*
|
|
43
|
+
An empty tag is the silent version of the mismatch above: `revalidateTag('')`
|
|
44
|
+
does nothing and says nothing. A builder that produces one is a bug in the
|
|
45
|
+
site's configuration, and the place to hear about it is the first call.
|
|
46
|
+
*/
|
|
47
|
+
function nonEmpty(tag, kind, slug) {
|
|
48
|
+
if (typeof tag !== 'string' || tag.length === 0) {
|
|
49
|
+
throw new Error(`The cache tag scheme built an empty ${kind} tag for "${slug}".`);
|
|
50
|
+
}
|
|
51
|
+
return tag;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=cache-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-tags.js","sourceRoot":"","sources":["../src/cache-tags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;EAmBE;AAoBF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,SAAyB,EAAE;IACzD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;IAChE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,CAAA;IACpE,OAAO;QACL,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC;QACpE,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC;KACzD,CAAA;AACH,CAAC;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAc,eAAe,EAAE,CAAA;AAE5D;;;;EAIE;AACF,SAAS,QAAQ,CAAC,GAAW,EAAE,IAAY,EAAE,IAAY;IACvD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,aAAa,IAAI,IAAI,CAAC,CAAA;IACnF,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@forumone/throughline/components`: the design system's component manifest,
|
|
3
|
+
* served to an MCP client: what exists, how it may be composed, and which
|
|
4
|
+
* component fits an intent. Was `@forumone/throughline-components` in 0.x.
|
|
5
|
+
*/
|
|
6
|
+
export { componentsPlugin } from './plugin.js';
|
|
7
|
+
export type { ComponentsPluginOptions, ManifestSource, MatchingConfig } from './options.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EAAE,uBAAuB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@forumone/throughline/components`: the design system's component manifest,
|
|
3
|
+
* served to an MCP client: what exists, how it may be composed, and which
|
|
4
|
+
* component fits an intent. Was `@forumone/throughline-components` in 0.x.
|
|
5
|
+
*/
|
|
6
|
+
export { componentsPlugin } from './plugin.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import { type LoadedManifest } from '@forumone/throughline-design-system/contract';
|
|
3
|
+
import type { ManifestSource } from './options.js';
|
|
4
|
+
export interface ManifestLoader {
|
|
5
|
+
/** Returns the cached manifest, refreshing if the URL TTL has expired. */
|
|
6
|
+
get(): Promise<LoadedManifest>;
|
|
7
|
+
/** Forces a re-fetch from the source. */
|
|
8
|
+
refresh(): Promise<LoadedManifest>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Builds a manifest loader from a source descriptor. The loader caches the
|
|
12
|
+
* parsed manifest indefinitely for `object` and `payload-collection` sources;
|
|
13
|
+
* for `url` sources it honors `refreshInterval` (seconds) and re-fetches when
|
|
14
|
+
* the cached copy is older than that.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createManifestLoader(source: ManifestSource, payload: Payload): ManifestLoader;
|
|
17
|
+
//# sourceMappingURL=manifest-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-source.d.ts","sourceRoot":"","sources":["../../src/components/manifest-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,8CAA8C,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC,CAAA;IAC9B,yCAAyC;IACzC,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC,CAAA;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,cAAc,CAuD7F"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { loadManifest, loadManifestFromUrl, } from '@forumone/throughline-design-system/contract';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a manifest loader from a source descriptor. The loader caches the
|
|
4
|
+
* parsed manifest indefinitely for `object` and `payload-collection` sources;
|
|
5
|
+
* for `url` sources it honors `refreshInterval` (seconds) and re-fetches when
|
|
6
|
+
* the cached copy is older than that.
|
|
7
|
+
*/
|
|
8
|
+
export function createManifestLoader(source, payload) {
|
|
9
|
+
let cached = null;
|
|
10
|
+
let lastLoadedAt = 0;
|
|
11
|
+
async function load() {
|
|
12
|
+
switch (source.type) {
|
|
13
|
+
case 'object':
|
|
14
|
+
return loadManifest(source.manifest);
|
|
15
|
+
case 'url':
|
|
16
|
+
return loadManifestFromUrl(source.url);
|
|
17
|
+
case 'payload-collection': {
|
|
18
|
+
const where = source.documentId
|
|
19
|
+
? { id: { equals: source.documentId } }
|
|
20
|
+
: undefined;
|
|
21
|
+
const result = await payload.find({
|
|
22
|
+
collection: source.slug,
|
|
23
|
+
...(where ? { where } : {}),
|
|
24
|
+
limit: 1,
|
|
25
|
+
sort: '-updatedAt',
|
|
26
|
+
});
|
|
27
|
+
const doc = result.docs[0];
|
|
28
|
+
if (!doc) {
|
|
29
|
+
const idClause = source.documentId ? ` with id "${source.documentId}"` : '';
|
|
30
|
+
throw new Error(`No manifest document found in collection "${source.slug}"${idClause}`);
|
|
31
|
+
}
|
|
32
|
+
const candidate = (doc['data'] ?? doc);
|
|
33
|
+
return loadManifest(candidate);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
async get() {
|
|
39
|
+
if (cached) {
|
|
40
|
+
if (source.type === 'url' && source.refreshInterval !== undefined) {
|
|
41
|
+
const ageMs = Date.now() - lastLoadedAt;
|
|
42
|
+
if (ageMs > source.refreshInterval * 1000) {
|
|
43
|
+
cached = await load();
|
|
44
|
+
lastLoadedAt = Date.now();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return cached;
|
|
48
|
+
}
|
|
49
|
+
cached = await load();
|
|
50
|
+
lastLoadedAt = Date.now();
|
|
51
|
+
return cached;
|
|
52
|
+
},
|
|
53
|
+
async refresh() {
|
|
54
|
+
cached = await load();
|
|
55
|
+
lastLoadedAt = Date.now();
|
|
56
|
+
return cached;
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=manifest-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-source.js","sourceRoot":"","sources":["../../src/components/manifest-source.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EACZ,mBAAmB,GACpB,MAAM,8CAA8C,CAAA;AAUrD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAsB,EAAE,OAAgB;IAC3E,IAAI,MAAM,GAA0B,IAAI,CAAA;IACxC,IAAI,YAAY,GAAG,CAAC,CAAA;IAEpB,KAAK,UAAU,IAAI;QACjB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,QAAQ;gBACX,OAAO,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YACtC,KAAK,KAAK;gBACR,OAAO,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACxC,KAAK,oBAAoB,CAAC,CAAC,CAAC;gBAC1B,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU;oBAC7B,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE;oBACvC,CAAC,CAAC,SAAS,CAAA;gBACb,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;oBAChC,UAAU,EAAE,MAAM,CAAC,IAAI;oBACvB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3B,KAAK,EAAE,CAAC;oBACR,IAAI,EAAE,YAAY;iBACnB,CAAC,CAAA;gBACF,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAwC,CAAA;gBACjE,IAAI,CAAC,GAAG,EAAE,CAAC;oBACT,MAAM,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B,EAAE,MAAM,YAAY,CAAA;AAC/C,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/matching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentContract } from '@forumone/throughline-design-system/contract';
|
|
2
|
+
import type { Matcher } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Simple TF-IDF matcher over component search documents. Indexed once at
|
|
5
|
+
* factory time; subsequent `rank()` calls scan the precomputed index.
|
|
6
|
+
*
|
|
7
|
+
* The search document weights `intent` more than `description`, and includes
|
|
8
|
+
* variant `whenToUse` text + example intents. Editorial language often shows
|
|
9
|
+
* up in those fields, so weighting them helps real intents like "introduce
|
|
10
|
+
* a new program" find the Hero's `intent` rather than its name.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createTfidfMatcher(components: ComponentContract[]): Matcher;
|
|
13
|
+
//# sourceMappingURL=tfidf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tfidf.d.ts","sourceRoot":"","sources":["../../../src/components/matching/tfidf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AACrF,OAAO,KAAK,EAAE,OAAO,EAAmB,MAAM,YAAY,CAAA;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,OAAO,CA8C3E"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple TF-IDF matcher over component search documents. Indexed once at
|
|
3
|
+
* factory time; subsequent `rank()` calls scan the precomputed index.
|
|
4
|
+
*
|
|
5
|
+
* The search document weights `intent` more than `description`, and includes
|
|
6
|
+
* variant `whenToUse` text + example intents. Editorial language often shows
|
|
7
|
+
* up in those fields, so weighting them helps real intents like "introduce
|
|
8
|
+
* a new program" find the Hero's `intent` rather than its name.
|
|
9
|
+
*/
|
|
10
|
+
export function createTfidfMatcher(components) {
|
|
11
|
+
const index = components.map((component) => {
|
|
12
|
+
const document = makeSearchDocument(component);
|
|
13
|
+
const tokens = tokenize(document);
|
|
14
|
+
const termFreq = new Map();
|
|
15
|
+
for (const token of tokens) {
|
|
16
|
+
termFreq.set(token, (termFreq.get(token) ?? 0) + 1);
|
|
17
|
+
}
|
|
18
|
+
return { component, terms: termFreq, length: Math.max(tokens.length, 1) };
|
|
19
|
+
});
|
|
20
|
+
const docCount = index.length;
|
|
21
|
+
const docFreq = new Map();
|
|
22
|
+
for (const entry of index) {
|
|
23
|
+
for (const term of entry.terms.keys()) {
|
|
24
|
+
docFreq.set(term, (docFreq.get(term) ?? 0) + 1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const idf = new Map();
|
|
28
|
+
for (const [term, df] of docFreq) {
|
|
29
|
+
idf.set(term, Math.log((docCount + 1) / (df + 1)) + 1);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
rank(query) {
|
|
33
|
+
const queryCounts = new Map();
|
|
34
|
+
for (const token of tokenize(query)) {
|
|
35
|
+
queryCounts.set(token, (queryCounts.get(token) ?? 0) + 1);
|
|
36
|
+
}
|
|
37
|
+
const scored = index.map((entry) => {
|
|
38
|
+
let score = 0;
|
|
39
|
+
for (const [term, queryCount] of queryCounts) {
|
|
40
|
+
const docCountForTerm = entry.terms.get(term) ?? 0;
|
|
41
|
+
if (docCountForTerm === 0)
|
|
42
|
+
continue;
|
|
43
|
+
const tf = docCountForTerm / entry.length;
|
|
44
|
+
const termIdf = idf.get(term) ?? 0;
|
|
45
|
+
score += tf * termIdf * queryCount;
|
|
46
|
+
}
|
|
47
|
+
return { component: entry.component, score };
|
|
48
|
+
});
|
|
49
|
+
scored.sort((a, b) => b.score - a.score);
|
|
50
|
+
return scored;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function makeSearchDocument(component) {
|
|
55
|
+
const parts = [
|
|
56
|
+
// Intent and description are the most-weighted fields. Repeat the intent
|
|
57
|
+
// twice so it dominates rankings when its terms match.
|
|
58
|
+
component.intent,
|
|
59
|
+
component.intent,
|
|
60
|
+
component.description,
|
|
61
|
+
component.name,
|
|
62
|
+
...(component.content.variants ?? []).flatMap((v) => [v.name, v.whenToUse]),
|
|
63
|
+
...component.examples.map((e) => e.intent),
|
|
64
|
+
];
|
|
65
|
+
return parts.join(' ');
|
|
66
|
+
}
|
|
67
|
+
function tokenize(text) {
|
|
68
|
+
return text
|
|
69
|
+
.toLowerCase()
|
|
70
|
+
.replace(/[^\w\s]/g, ' ')
|
|
71
|
+
.split(/\s+/)
|
|
72
|
+
.filter((t) => t.length > 2 && !STOP_WORDS.has(t));
|
|
73
|
+
}
|
|
74
|
+
const STOP_WORDS = new Set([
|
|
75
|
+
'the',
|
|
76
|
+
'and',
|
|
77
|
+
'for',
|
|
78
|
+
'with',
|
|
79
|
+
'that',
|
|
80
|
+
'this',
|
|
81
|
+
'have',
|
|
82
|
+
'has',
|
|
83
|
+
'had',
|
|
84
|
+
'are',
|
|
85
|
+
'was',
|
|
86
|
+
'were',
|
|
87
|
+
'been',
|
|
88
|
+
'being',
|
|
89
|
+
'will',
|
|
90
|
+
'would',
|
|
91
|
+
'should',
|
|
92
|
+
'could',
|
|
93
|
+
'may',
|
|
94
|
+
'might',
|
|
95
|
+
'must',
|
|
96
|
+
'shall',
|
|
97
|
+
'can',
|
|
98
|
+
'these',
|
|
99
|
+
'those',
|
|
100
|
+
'its',
|
|
101
|
+
'use',
|
|
102
|
+
'used',
|
|
103
|
+
'using',
|
|
104
|
+
'when',
|
|
105
|
+
'where',
|
|
106
|
+
'how',
|
|
107
|
+
'what',
|
|
108
|
+
'which',
|
|
109
|
+
'into',
|
|
110
|
+
'onto',
|
|
111
|
+
'than',
|
|
112
|
+
'then',
|
|
113
|
+
'them',
|
|
114
|
+
'they',
|
|
115
|
+
'their',
|
|
116
|
+
'there',
|
|
117
|
+
]);
|
|
118
|
+
//# sourceMappingURL=tfidf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tfidf.js","sourceRoot":"","sources":["../../../src/components/matching/tfidf.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA+B;IAChE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACzC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACjC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAA;QAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QACrD,CAAC;QACD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAA;IAC3E,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAA;IAC7B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAA;IACzC,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;QAC1B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,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AAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,QAAQ;IACR,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentContract } from '@forumone/throughline-design-system/contract';
|
|
2
|
+
export interface RankedComponent {
|
|
3
|
+
component: ComponentContract;
|
|
4
|
+
score: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Matcher {
|
|
7
|
+
/** Returns the indexed components ranked best-first against the query. */
|
|
8
|
+
rank(query: string): RankedComponent[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Surface returned by {@link suggest_for_intent}. Same shape regardless of the
|
|
12
|
+
* underlying matcher.
|
|
13
|
+
*/
|
|
14
|
+
export interface RankedSuggestion {
|
|
15
|
+
component: string;
|
|
16
|
+
score: number;
|
|
17
|
+
reasoning: string;
|
|
18
|
+
matchedIntent: string;
|
|
19
|
+
variant?: string;
|
|
20
|
+
warnings?: string[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/matching/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAErF,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,iBAAiB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,OAAO;IACtB,0EAA0E;IAC1E,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CAAA;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/matching/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { McpToolCollector } from '../mcp/collector.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { BaseCorePluginOptions } from '../plugin-contract/index.js';
|
|
4
|
+
import type { Manifest } from '@forumone/throughline-design-system/contract';
|
|
5
|
+
export type ManifestSource = {
|
|
6
|
+
type: 'object';
|
|
7
|
+
manifest: Manifest;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'url';
|
|
10
|
+
url: string;
|
|
11
|
+
refreshInterval?: number;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'payload-collection';
|
|
14
|
+
slug: string;
|
|
15
|
+
documentId?: string;
|
|
16
|
+
};
|
|
17
|
+
export interface MatchingConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Strategy for ranking components against a natural-language intent.
|
|
20
|
+
* `tfidf` ships now and requires no external dependencies; `embeddings`
|
|
21
|
+
* is reserved for a follow-up.
|
|
22
|
+
*/
|
|
23
|
+
strategy: 'tfidf';
|
|
24
|
+
/** Maximum number of recommendations from `suggest_for_intent`. Default: 5. */
|
|
25
|
+
maxRecommendations?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface ComponentsPluginOptions extends Omit<BaseCorePluginOptions, 'routePrefix'> {
|
|
28
|
+
/** Required: where the design system manifest comes from. */
|
|
29
|
+
manifest: ManifestSource;
|
|
30
|
+
/** Optional: how the plugin matches intents to components. Defaults to TF-IDF. */
|
|
31
|
+
matching?: MatchingConfig;
|
|
32
|
+
/**
|
|
33
|
+
* Where to put this server's MCP tools so Payload's own MCP plugin can serve
|
|
34
|
+
* them.
|
|
35
|
+
*
|
|
36
|
+
* `createMcpToolCollector()` from `@forumone/throughline`. The host hands
|
|
37
|
+
* its array to `@payloadcms/plugin-mcp` at config time and this plugin fills
|
|
38
|
+
* it at `onInit` — which is the first moment the tools can exist, since they
|
|
39
|
+
* close over `payload`, and still before any request reads the array.
|
|
40
|
+
*
|
|
41
|
+
* Omit it and nothing changes: this server keeps its own `/mcp` endpoint,
|
|
42
|
+
* which is what lets a host move one server at a time.
|
|
43
|
+
*/
|
|
44
|
+
mcpTools?: McpToolCollector;
|
|
45
|
+
}
|
|
46
|
+
export declare const ComponentsPluginOptionsSchema: z.ZodObject<{
|
|
47
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
manifest: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"object">;
|
|
50
|
+
manifest: z.ZodUnknown;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
type: "object";
|
|
53
|
+
manifest?: unknown;
|
|
54
|
+
}, {
|
|
55
|
+
type: "object";
|
|
56
|
+
manifest?: unknown;
|
|
57
|
+
}>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"url">;
|
|
59
|
+
url: z.ZodString;
|
|
60
|
+
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
type: "url";
|
|
63
|
+
url: string;
|
|
64
|
+
refreshInterval?: number | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
type: "url";
|
|
67
|
+
url: string;
|
|
68
|
+
refreshInterval?: number | undefined;
|
|
69
|
+
}>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"payload-collection">;
|
|
71
|
+
slug: z.ZodString;
|
|
72
|
+
documentId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
type: "payload-collection";
|
|
75
|
+
slug: string;
|
|
76
|
+
documentId?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
type: "payload-collection";
|
|
79
|
+
slug: string;
|
|
80
|
+
documentId?: string | undefined;
|
|
81
|
+
}>]>;
|
|
82
|
+
matching: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
strategy: z.ZodEnum<["tfidf"]>;
|
|
84
|
+
maxRecommendations: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
strategy: "tfidf";
|
|
87
|
+
maxRecommendations?: number | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
strategy: "tfidf";
|
|
90
|
+
maxRecommendations?: number | undefined;
|
|
91
|
+
}>>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
manifest: {
|
|
94
|
+
type: "object";
|
|
95
|
+
manifest?: unknown;
|
|
96
|
+
} | {
|
|
97
|
+
type: "url";
|
|
98
|
+
url: string;
|
|
99
|
+
refreshInterval?: number | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
type: "payload-collection";
|
|
102
|
+
slug: string;
|
|
103
|
+
documentId?: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
enabled?: boolean | undefined;
|
|
106
|
+
matching?: {
|
|
107
|
+
strategy: "tfidf";
|
|
108
|
+
maxRecommendations?: number | undefined;
|
|
109
|
+
} | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
manifest: {
|
|
112
|
+
type: "object";
|
|
113
|
+
manifest?: unknown;
|
|
114
|
+
} | {
|
|
115
|
+
type: "url";
|
|
116
|
+
url: string;
|
|
117
|
+
refreshInterval?: number | undefined;
|
|
118
|
+
} | {
|
|
119
|
+
type: "payload-collection";
|
|
120
|
+
slug: string;
|
|
121
|
+
documentId?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
enabled?: boolean | undefined;
|
|
124
|
+
matching?: {
|
|
125
|
+
strategy: "tfidf";
|
|
126
|
+
maxRecommendations?: number | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
/**
|
|
130
|
+
* Validates plugin options at load time. Throws with a multi-line message
|
|
131
|
+
* on schema failure or with a targeted message on cross-field violations.
|
|
132
|
+
* Plugins that depend on this server must initialize after `componentsPlugin`
|
|
133
|
+
* because the registry capability check happens during onInit.
|
|
134
|
+
*/
|
|
135
|
+
export declare function validateOptions(options: ComponentsPluginOptions): ComponentsPluginOptions;
|
|
136
|
+
//# sourceMappingURL=options.d.ts.map
|