@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,280 @@
|
|
|
1
|
+
import type { Payload } from 'payload';
|
|
2
|
+
import type { CacheTags } from '../cache-tags.js';
|
|
3
|
+
/**
|
|
4
|
+
* Common dependencies for the platform's jobs. None takes a runner: the
|
|
5
|
+
* adapter is the runner (`inngestJobs(inngest, …)` or `payloadJobs()`), and
|
|
6
|
+
* Payload comes from the job's options or from the adapter.
|
|
7
|
+
*/
|
|
8
|
+
export type WorkflowFailureHandler = (args: {
|
|
9
|
+
/** The error that exhausted the retries. */
|
|
10
|
+
error: Error;
|
|
11
|
+
/** Inngest's `function.failed` payload, which names the run. */
|
|
12
|
+
event: {
|
|
13
|
+
data?: {
|
|
14
|
+
function_id?: string;
|
|
15
|
+
run_id?: string;
|
|
16
|
+
event?: {
|
|
17
|
+
name?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}) => Promise<void> | void;
|
|
22
|
+
export interface BaseWorkflowOptions {
|
|
23
|
+
payload: Payload;
|
|
24
|
+
/**
|
|
25
|
+
* Called once when a run has exhausted its retries.
|
|
26
|
+
*
|
|
27
|
+
* Named `onTerminalFailure` rather than `onFailure`, and the collision that
|
|
28
|
+
* forced it is worth keeping in view: `HealthcheckOptions.onFailure` already
|
|
29
|
+
* exists and is a different thing — it fires once per run with the list of
|
|
30
|
+
* checks that failed, on the *first* bad run, because a probe has no retries
|
|
31
|
+
* to exhaust. Both are useful and a function can take both. One name for two
|
|
32
|
+
* moments would have made every call site ambiguous about which it wired.
|
|
33
|
+
*
|
|
34
|
+
* Optional, and absent means the previous behaviour: the failure reaches
|
|
35
|
+
* whatever Inngest's dashboard shows and nothing else. A host that passes one
|
|
36
|
+
* gets the only signal that does not require somebody to go and look.
|
|
37
|
+
*/
|
|
38
|
+
onTerminalFailure?: WorkflowFailureHandler;
|
|
39
|
+
/**
|
|
40
|
+
* Maximum simultaneous runs of this function.
|
|
41
|
+
*
|
|
42
|
+
* Two of the crons here default to 1 because they read a set of due rows and
|
|
43
|
+
* then act on them, which is a lost-update race between overlapping runs —
|
|
44
|
+
* see each one's own note. Passing a value overrides that; passing one for a
|
|
45
|
+
* workflow with no default adds a cap where there was none.
|
|
46
|
+
*/
|
|
47
|
+
concurrency?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The failure and concurrency half of a function config, built once.
|
|
51
|
+
*
|
|
52
|
+
* Spread into each `createFunction` config so the five workflows cannot
|
|
53
|
+
* disagree about the shape — the same reason `collect-component-tokens.ts` was
|
|
54
|
+
* extracted, where the writer and the checker being separate implementations
|
|
55
|
+
* left 61 of 74 contracts drifted.
|
|
56
|
+
*
|
|
57
|
+
* `defaultConcurrency` is the factory's own answer, used when the host passes
|
|
58
|
+
* none. Omitting both keys rather than passing `undefined` matters:
|
|
59
|
+
* `exactOptionalPropertyTypes` is on, and Inngest reads the presence of the key.
|
|
60
|
+
*/
|
|
61
|
+
export declare function failureOptions(options: FailureAwareOptions, defaultConcurrency?: number): {
|
|
62
|
+
onFailure?: WorkflowFailureHandler;
|
|
63
|
+
concurrency?: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The two fields `failureOptions` reads, and nothing else.
|
|
67
|
+
*
|
|
68
|
+
* Narrower than `BaseWorkflowOptions` on purpose: `AuditEventEchoOptions` takes
|
|
69
|
+
* no `payload`, so it is not a `BaseWorkflowOptions` and asking
|
|
70
|
+
* for one would have excluded it from failure handling for a reason that has
|
|
71
|
+
* nothing to do with failure handling.
|
|
72
|
+
*/
|
|
73
|
+
export interface FailureAwareOptions {
|
|
74
|
+
onTerminalFailure?: WorkflowFailureHandler;
|
|
75
|
+
concurrency?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface RevalidatePathsInput {
|
|
78
|
+
/** A page path (`/about`, `/blog/post-1`, or `''` for layout-level only). */
|
|
79
|
+
path: string;
|
|
80
|
+
/** Tag list passed through to Next.js's `revalidateTag`. */
|
|
81
|
+
tags: string[];
|
|
82
|
+
}
|
|
83
|
+
export type RevalidateFn = (input: RevalidatePathsInput) => Promise<void>;
|
|
84
|
+
export interface RevalidateOnPublishOptions extends BaseWorkflowOptions {
|
|
85
|
+
/**
|
|
86
|
+
* Custom revalidation function. Defaults to Next.js `revalidatePath` +
|
|
87
|
+
* `revalidateTag` (loaded via dynamic import so non-Next.js consumers
|
|
88
|
+
* don't fail to import the package). Supply your own for non-Next.js
|
|
89
|
+
* frontends or richer cache invalidation.
|
|
90
|
+
*/
|
|
91
|
+
revalidate?: RevalidateFn;
|
|
92
|
+
/**
|
|
93
|
+
* Per-collection URL builders: where a document of each collection is
|
|
94
|
+
* served, given its slug. Required, and there are no built-in entries —
|
|
95
|
+
* only the site knows its routes. A collection with no entry has its tags
|
|
96
|
+
* dropped and no path revalidated, and the run logs a warning.
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* urlBuilders: {
|
|
100
|
+
* pages: (slug) => (slug === 'home' ? '/' : `/${slug}`),
|
|
101
|
+
* posts: (slug) => `/news/${slug}`,
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
urlBuilders: Record<string, (slug: string) => string>;
|
|
106
|
+
/**
|
|
107
|
+
* The tag scheme, shared with readers and with
|
|
108
|
+
* `createTagRevalidationHooks`. A collection with no `collectionTags` entry
|
|
109
|
+
* drops `[cacheTags.collection(<collection>)]`. Default: `defaultCacheTags`,
|
|
110
|
+
* whose collection tag is the bare slug.
|
|
111
|
+
*/
|
|
112
|
+
cacheTags?: CacheTags;
|
|
113
|
+
/**
|
|
114
|
+
* Per-collection cache tags, overriding the scheme for that collection.
|
|
115
|
+
* Multiple tags supported for collections that participate in shared
|
|
116
|
+
* listings (e.g. `programs` → `['programs', 'sitemap']`).
|
|
117
|
+
*/
|
|
118
|
+
collectionTags?: Record<string, string[]>;
|
|
119
|
+
/**
|
|
120
|
+
* Override the function id. Default: `revalidate-on-publish`.
|
|
121
|
+
* Useful if multiple instances of the workflow run in the same Inngest
|
|
122
|
+
* deployment (rare).
|
|
123
|
+
*/
|
|
124
|
+
id?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface ScheduledCollectionConfig {
|
|
127
|
+
slug: string;
|
|
128
|
+
/**
|
|
129
|
+
* Field name carrying the publish status. Default: `_status`.
|
|
130
|
+
* Override only if the collection uses a non-default status field.
|
|
131
|
+
*/
|
|
132
|
+
statusField?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Field name carrying the scheduled-publish timestamp. Default: `scheduledPublishAt`.
|
|
135
|
+
*/
|
|
136
|
+
scheduledField?: string;
|
|
137
|
+
}
|
|
138
|
+
/** One document the cron found due, handed to `publish`. */
|
|
139
|
+
export interface ScheduledPublishRequest {
|
|
140
|
+
collection: string;
|
|
141
|
+
id: string;
|
|
142
|
+
/** Recorded on the audit event, so a scheduled publish is distinguishable. */
|
|
143
|
+
reasoning: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* What `publish` reports back. `published: false` is a policy refusal — a
|
|
147
|
+
* composition error, a missing approval — and is expected traffic, not a fault.
|
|
148
|
+
*/
|
|
149
|
+
export interface ScheduledPublishResult {
|
|
150
|
+
published: boolean;
|
|
151
|
+
reason?: string | undefined;
|
|
152
|
+
}
|
|
153
|
+
export interface ExecuteScheduledPublishesOptions extends BaseWorkflowOptions {
|
|
154
|
+
/** Collections that participate in scheduled publishing. */
|
|
155
|
+
collections: ScheduledCollectionConfig[];
|
|
156
|
+
/** Cron schedule. Default: `*\/5 * * * *` (every 5 minutes). */
|
|
157
|
+
schedule?: string;
|
|
158
|
+
/**
|
|
159
|
+
* How to publish one document. **Wire this to the publishing service**, not to
|
|
160
|
+
* `payload.update` — the service is the seven-stage pipeline, and a direct
|
|
161
|
+
* write skips composition, accessibility and approval gating:
|
|
162
|
+
*
|
|
163
|
+
* ```ts
|
|
164
|
+
* import { getPublishingService } from '@forumone/throughline/publishing'
|
|
165
|
+
*
|
|
166
|
+
* publish: async ({ collection, id, reasoning }) => {
|
|
167
|
+
* const outcome = await getPublishingService(payload).publish({
|
|
168
|
+
* collection,
|
|
169
|
+
* id,
|
|
170
|
+
* actor: { apiKeyName: 'scheduled-publish', channel: 'mcp' },
|
|
171
|
+
* meta: { reasoning },
|
|
172
|
+
* })
|
|
173
|
+
* return { published: outcome.published, reason: outcome.reason }
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* Injected rather than built in because this package is a leaf — it depends on
|
|
178
|
+
* `core` alone, and reaching the publishing service means depending on the
|
|
179
|
+
* publishing package or duplicating its symbol string.
|
|
180
|
+
*
|
|
181
|
+
* It used to be a `fetch` to `POST /api/publishing/mcp` with a bearer key, and
|
|
182
|
+
* that endpoint no longer exists. The self-call was also the wrong shape: it
|
|
183
|
+
* cost a function invocation per document, needed a key and a base URL to be
|
|
184
|
+
* right, and returned 401 rather than publishing anything if the deployment
|
|
185
|
+
* URL sat behind access protection.
|
|
186
|
+
*/
|
|
187
|
+
publish: (request: ScheduledPublishRequest,
|
|
188
|
+
/** The Payload the job runs against, for a callback declared before Payload exists. */
|
|
189
|
+
context: {
|
|
190
|
+
payload: Payload;
|
|
191
|
+
}) => Promise<ScheduledPublishResult>;
|
|
192
|
+
/**
|
|
193
|
+
* Leave a document alone until it is this many milliseconds past its time.
|
|
194
|
+
* Default: 0.
|
|
195
|
+
*
|
|
196
|
+
* For a host that also runs `publishAtScheduledTimeJob`, which
|
|
197
|
+
* publishes on time and makes this poll a backstop for an event that never
|
|
198
|
+
* arrived. Without a grace period the two can reach the same due document in
|
|
199
|
+
* the same moment and publish it twice.
|
|
200
|
+
*/
|
|
201
|
+
overdueByMs?: number;
|
|
202
|
+
/** Override the function id. Default: `execute-scheduled-publishes`. */
|
|
203
|
+
id?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface PublishAtScheduledTimeOptions extends BaseWorkflowOptions {
|
|
206
|
+
/**
|
|
207
|
+
* Collections that participate in scheduled publishing. An event naming any
|
|
208
|
+
* other collection is ignored.
|
|
209
|
+
*/
|
|
210
|
+
collections: ScheduledCollectionConfig[];
|
|
211
|
+
/** How to publish one document. The same contract, and the same warning, as `ExecuteScheduledPublishesOptions.publish`. */
|
|
212
|
+
publish: (request: ScheduledPublishRequest,
|
|
213
|
+
/** The Payload the job runs against, for a callback declared before Payload exists. */
|
|
214
|
+
context: {
|
|
215
|
+
payload: Payload;
|
|
216
|
+
}) => Promise<ScheduledPublishResult>;
|
|
217
|
+
/**
|
|
218
|
+
* The longest single sleep, in milliseconds. A schedule further out is
|
|
219
|
+
* reached by relaying the event. Default: six days — Inngest's free plan caps
|
|
220
|
+
* a sleep at seven.
|
|
221
|
+
*/
|
|
222
|
+
maxSleepMs?: number;
|
|
223
|
+
/** Override the function id. Default: `publish-at-scheduled-time`. */
|
|
224
|
+
id?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface ExpireStaleApprovalsOptions extends BaseWorkflowOptions {
|
|
227
|
+
/** Approvals collection slug. Default: 'approvals'. */
|
|
228
|
+
collectionSlug?: string;
|
|
229
|
+
/** Cron schedule. Default: `0 2 * * *` (daily at 2am UTC). */
|
|
230
|
+
schedule?: string;
|
|
231
|
+
/** Override the function id. Default: `expire-stale-approvals`. */
|
|
232
|
+
id?: string;
|
|
233
|
+
}
|
|
234
|
+
export interface AuditEchoEvent {
|
|
235
|
+
action: string;
|
|
236
|
+
data: Record<string, unknown>;
|
|
237
|
+
}
|
|
238
|
+
export interface AuditEchoHandler {
|
|
239
|
+
/** Predicate. Return true to run `handle`. */
|
|
240
|
+
match: (event: {
|
|
241
|
+
action: string;
|
|
242
|
+
}) => boolean;
|
|
243
|
+
/** Side-effects (e.g. fire a follow-on Inngest event). */
|
|
244
|
+
handle: (event: AuditEchoEvent) => Promise<void>;
|
|
245
|
+
}
|
|
246
|
+
export interface AuditEventEchoOptions extends FailureAwareOptions {
|
|
247
|
+
/**
|
|
248
|
+
* Additional handlers run after the built-in approval fan-out. Each
|
|
249
|
+
* handler is wrapped in its own `step.run` so failures retry independently.
|
|
250
|
+
*/
|
|
251
|
+
handlers?: AuditEchoHandler[];
|
|
252
|
+
/** Override the function id. Default: `audit-event-echo`. */
|
|
253
|
+
id?: string;
|
|
254
|
+
}
|
|
255
|
+
export interface HealthcheckResult {
|
|
256
|
+
ok: boolean;
|
|
257
|
+
details?: string;
|
|
258
|
+
}
|
|
259
|
+
export interface HealthcheckDefinition {
|
|
260
|
+
name: string;
|
|
261
|
+
run: (ctx: {
|
|
262
|
+
payload: Payload;
|
|
263
|
+
}) => Promise<HealthcheckResult>;
|
|
264
|
+
}
|
|
265
|
+
export interface HealthcheckOptions extends BaseWorkflowOptions {
|
|
266
|
+
checks: HealthcheckDefinition[];
|
|
267
|
+
/** Cron schedule. Default: `*\/15 * * * *`. */
|
|
268
|
+
schedule?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Called once per run when at least one check fails. Defaults to
|
|
271
|
+
* `console.error`; production deployments route this to monitoring.
|
|
272
|
+
*/
|
|
273
|
+
onFailure?: (failures: Array<{
|
|
274
|
+
name: string;
|
|
275
|
+
details?: string;
|
|
276
|
+
}>) => Promise<void>;
|
|
277
|
+
/** Override the function id. Default: `healthcheck`. */
|
|
278
|
+
id?: string;
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=workflow-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-types.d.ts","sourceRoot":"","sources":["../../src/jobs/workflow-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;;GAIG;AAkBH,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE;IAC1C,4CAA4C;IAC5C,KAAK,EAAE,KAAK,CAAA;IACZ,gEAAgE;IAChE,KAAK,EAAE;QACL,IAAI,CAAC,EAAE;YACL,WAAW,CAAC,EAAE,MAAM,CAAA;YACpB,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,KAAK,CAAC,EAAE;gBAAE,IAAI,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;SAC1B,CAAA;KACF,CAAA;CACF,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAE1B,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,mBAAmB,EAC5B,kBAAkB,CAAC,EAAE,MAAM,GAC1B;IAAE,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAS9D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzE,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE;;;;;OAKG;IACH,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB;;;;;;;;;;;;OAYG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IACrD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACzC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,gCAAiC,SAAQ,mBAAmB;IAC3E,4DAA4D;IAC5D,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,OAAO,EAAE,CACP,OAAO,EAAE,uBAAuB;IAChC,uFAAuF;IACvF,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAC1B,OAAO,CAAC,sBAAsB,CAAC,CAAA;IACpC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;OAGG;IACH,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,2HAA2H;IAC3H,OAAO,EAAE,CACP,OAAO,EAAE,uBAAuB;IAChC,uFAAuF;IACvF,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAC1B,OAAO,CAAC,sBAAsB,CAAC,CAAA;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,KAAK,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAA;IAC7C,0DAA0D;IAC1D,MAAM,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACjD;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;OAGG;IACH,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC7B,6DAA6D;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,OAAO,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,CAAC,GAAG,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAA;CAC/D;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC/B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAClF,wDAAwD;IACxD,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The failure and concurrency half of a function config, built once.
|
|
3
|
+
*
|
|
4
|
+
* Spread into each `createFunction` config so the five workflows cannot
|
|
5
|
+
* disagree about the shape — the same reason `collect-component-tokens.ts` was
|
|
6
|
+
* extracted, where the writer and the checker being separate implementations
|
|
7
|
+
* left 61 of 74 contracts drifted.
|
|
8
|
+
*
|
|
9
|
+
* `defaultConcurrency` is the factory's own answer, used when the host passes
|
|
10
|
+
* none. Omitting both keys rather than passing `undefined` matters:
|
|
11
|
+
* `exactOptionalPropertyTypes` is on, and Inngest reads the presence of the key.
|
|
12
|
+
*/
|
|
13
|
+
export function failureOptions(options, defaultConcurrency) {
|
|
14
|
+
const concurrency = options.concurrency ?? defaultConcurrency;
|
|
15
|
+
return {
|
|
16
|
+
// `onFailure` is Inngest's key; `onTerminalFailure` is ours. The rename
|
|
17
|
+
// happens here, once, which is the other reason this is a function.
|
|
18
|
+
...(options.onTerminalFailure ? { onFailure: options.onTerminalFailure } : {}),
|
|
19
|
+
...(concurrency !== undefined ? { concurrency } : {}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=workflow-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-types.js","sourceRoot":"","sources":["../../src/jobs/workflow-types.ts"],"names":[],"mappings":"AAkEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA4B,EAC5B,kBAA2B;IAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,kBAAkB,CAAA;IAE7D,OAAO;QACL,wEAAwE;QACxE,oEAAoE;QACpE,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtD,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Logger } from '../plugin-contract/index.js';
|
|
2
|
+
/** Default logger that delegates to `console`. Plugins fall back to this when no logger is supplied. */
|
|
3
|
+
export declare const defaultLogger: Logger;
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a logger so every message is prefixed with a `[name]` tag. Useful
|
|
6
|
+
* for request-scoped or plugin-scoped logging.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createNamedLogger(name: string, base?: Logger): Logger;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logger/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAEzD,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,MAiB3B,CAAA;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAsB,GAAG,MAAM,CAQpF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Default logger that delegates to `console`. Plugins fall back to this when no logger is supplied. */
|
|
2
|
+
export const defaultLogger = {
|
|
3
|
+
debug: (message, context) => {
|
|
4
|
+
if (context)
|
|
5
|
+
console.debug(message, context);
|
|
6
|
+
else
|
|
7
|
+
console.debug(message);
|
|
8
|
+
},
|
|
9
|
+
info: (message, context) => {
|
|
10
|
+
if (context)
|
|
11
|
+
console.log(message, context);
|
|
12
|
+
else
|
|
13
|
+
console.log(message);
|
|
14
|
+
},
|
|
15
|
+
warn: (message, context) => {
|
|
16
|
+
if (context)
|
|
17
|
+
console.warn(message, context);
|
|
18
|
+
else
|
|
19
|
+
console.warn(message);
|
|
20
|
+
},
|
|
21
|
+
error: (message, context) => {
|
|
22
|
+
if (context)
|
|
23
|
+
console.error(message, context);
|
|
24
|
+
else
|
|
25
|
+
console.error(message);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Wraps a logger so every message is prefixed with a `[name]` tag. Useful
|
|
30
|
+
* for request-scoped or plugin-scoped logging.
|
|
31
|
+
*/
|
|
32
|
+
export function createNamedLogger(name, base = defaultLogger) {
|
|
33
|
+
const tag = `[${name}]`;
|
|
34
|
+
return {
|
|
35
|
+
debug: (message, context) => base.debug(`${tag} ${message}`, context),
|
|
36
|
+
info: (message, context) => base.info(`${tag} ${message}`, context),
|
|
37
|
+
warn: (message, context) => base.warn(`${tag} ${message}`, context),
|
|
38
|
+
error: (message, context) => base.error(`${tag} ${message}`, context),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logger/index.ts"],"names":[],"mappings":"AAGA,wGAAwG;AACxG,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QAC1B,IAAI,OAAO;YAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;;YACvC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC7B,CAAC;IACD,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QACzB,IAAI,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;;YACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;IACD,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QACzB,IAAI,OAAO;YAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;;YACtC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC5B,CAAC;IACD,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;QAC1B,IAAI,OAAO;YAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;;YACvC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC7B,CAAC;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,OAAe,aAAa;IAC1E,MAAM,GAAG,GAAG,IAAI,IAAI,GAAG,CAAA;IACvB,OAAO;QACL,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,EAAE,OAAO,CAAC;QACrE,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,EAAE,OAAO,CAAC;QACnE,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,EAAE,OAAO,CAAC;QACnE,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,OAAO,EAAE,EAAE,OAAO,CAAC;KACtE,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Access, CollectionConfig } from 'payload';
|
|
2
|
+
/** The slug `@payloadcms/plugin-mcp` gives its key collection. */
|
|
3
|
+
export declare const MCP_API_KEYS_SLUG = "payload-mcp-api-keys";
|
|
4
|
+
/** What Payload puts on `req.user`. */
|
|
5
|
+
export type AccessUser = Parameters<Access>[0]['req']['user'];
|
|
6
|
+
/**
|
|
7
|
+
* True when `req.user` is an MCP key document rather than a person.
|
|
8
|
+
*
|
|
9
|
+
* Only a request authenticated by Payload's REST API-key strategy against the
|
|
10
|
+
* key collection carries this principal — which Payload 3.89.0 and later no
|
|
11
|
+
* longer register. A tool call through `/api/mcp` arrives as the key's user.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isMcpApiKeyPrincipal(user: AccessUser | undefined): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A principal a site should treat as a signed-in person.
|
|
16
|
+
*
|
|
17
|
+
* Use this wherever an access rule would otherwise say `Boolean(req.user)` —
|
|
18
|
+
* which is the rule Payload's own `defaultAccess` uses. A bearer credential
|
|
19
|
+
* presented over REST is a `req.user` and is not somebody signed in.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSignedIn(user: AccessUser | undefined): user is NonNullable<AccessUser>;
|
|
22
|
+
/** `isSignedIn` as a Payload `Access` function. */
|
|
23
|
+
export declare const signedIn: Access;
|
|
24
|
+
/**
|
|
25
|
+
* An `overrideApiKeyCollection` for `mcpPlugin` that makes the key collection
|
|
26
|
+
* admin-only: read, create, update, delete and unlock all answer to `isAdmin`.
|
|
27
|
+
*
|
|
28
|
+
* `isAdmin` is the site's own rule, since only the site knows what an
|
|
29
|
+
* administrator is. Whatever it says, an MCP key principal is refused first, so
|
|
30
|
+
* a key can never manage keys.
|
|
31
|
+
*
|
|
32
|
+
* It touches `access` and nothing else, so it composes with other overrides:
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* const keysAdminOnly = mcpApiKeyAccess(isAdmin)
|
|
36
|
+
*
|
|
37
|
+
* mcpPlugin({
|
|
38
|
+
* mcp: { tools: mcpTools.tools },
|
|
39
|
+
* overrideApiKeyCollection: collection => {
|
|
40
|
+
* const hardened = keysAdminOnly(collection)
|
|
41
|
+
* return { ...hardened, admin: { ...hardened.admin, group: 'Throughline' } }
|
|
42
|
+
* },
|
|
43
|
+
* })
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* The plugin's field-level rules on the key's `user` relationship are left as
|
|
47
|
+
* shipped: a new key is bound to whoever creates it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function mcpApiKeyAccess(isAdmin: Access): (collection: CollectionConfig) => CollectionConfig;
|
|
50
|
+
//# sourceMappingURL=api-key-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key-access.d.ts","sourceRoot":"","sources":["../../src/mcp/api-key-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAiCvD,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,yBAAyB,CAAA;AAEvD,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7D;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,IAAI,WAAW,CAAC,UAAU,CAAC,CAExF;AAED,mDAAmD;AACnD,eAAO,MAAM,QAAQ,EAAE,MAA0C,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GACd,CAAC,UAAU,EAAE,gBAAgB,KAAK,gBAAgB,CAcpD"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Who may manage MCP keys, and who counts as signed in. Issue #157.
|
|
3
|
+
|
|
4
|
+
**The key collection.** `@payloadcms/plugin-mcp` brings `payload-mcp-api-keys`.
|
|
5
|
+
Older releases declared it with no `access` block, so every operation fell
|
|
6
|
+
through to Payload's `defaultAccess` — anybody signed in. Current ones scope each
|
|
7
|
+
person to their own keys. Neither is the right rule for a collection of
|
|
8
|
+
credentials: a key runs every tool as the person it is bound to, so who may mint,
|
|
9
|
+
read, rotate and revoke one is an administrator's decision. `mcpApiKeyAccess`
|
|
10
|
+
makes it one, through the plugin's `overrideApiKeyCollection`.
|
|
11
|
+
|
|
12
|
+
**The principal.** The collection sets `auth.useAPIKey: true`. Before Payload
|
|
13
|
+
3.89.0 that registered Payload's API-key strategy globally, so
|
|
14
|
+
`Authorization: payload-mcp-api-keys API-Key <key>` was accepted on every REST
|
|
15
|
+
route and put the *key document* on `req.user`, tagged
|
|
16
|
+
`collection: 'payload-mcp-api-keys'`. It has no roles, so role checks denied it;
|
|
17
|
+
`Boolean(req.user)` did not. On a site whose draft rule was "published, or
|
|
18
|
+
anybody signed in", that served every draft to anyone holding a key, with no MCP
|
|
19
|
+
involved.
|
|
20
|
+
|
|
21
|
+
3.89.0 excludes that slug from the strategy loop, and the suite's peer floor is
|
|
22
|
+
`^3.89.0` because of it. But one conditional in a dependency is not a control
|
|
23
|
+
anybody here would notice losing, so `isSignedIn` refuses the key principal
|
|
24
|
+
itself. Two things then have to fail for the hole to reopen.
|
|
25
|
+
|
|
26
|
+
**This cannot affect `/api/mcp`.** That endpoint resolves a presented key on its
|
|
27
|
+
own and runs the tool as the *user* the key points at, on the users collection,
|
|
28
|
+
with that person's roles. Only the REST strategy's principal carries the key
|
|
29
|
+
collection's slug, and that is the only principal refused here.
|
|
30
|
+
*/
|
|
31
|
+
/** The slug `@payloadcms/plugin-mcp` gives its key collection. */
|
|
32
|
+
export const MCP_API_KEYS_SLUG = 'payload-mcp-api-keys';
|
|
33
|
+
/**
|
|
34
|
+
* True when `req.user` is an MCP key document rather than a person.
|
|
35
|
+
*
|
|
36
|
+
* Only a request authenticated by Payload's REST API-key strategy against the
|
|
37
|
+
* key collection carries this principal — which Payload 3.89.0 and later no
|
|
38
|
+
* longer register. A tool call through `/api/mcp` arrives as the key's user.
|
|
39
|
+
*/
|
|
40
|
+
export function isMcpApiKeyPrincipal(user) {
|
|
41
|
+
return user?.collection === MCP_API_KEYS_SLUG;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A principal a site should treat as a signed-in person.
|
|
45
|
+
*
|
|
46
|
+
* Use this wherever an access rule would otherwise say `Boolean(req.user)` —
|
|
47
|
+
* which is the rule Payload's own `defaultAccess` uses. A bearer credential
|
|
48
|
+
* presented over REST is a `req.user` and is not somebody signed in.
|
|
49
|
+
*/
|
|
50
|
+
export function isSignedIn(user) {
|
|
51
|
+
return Boolean(user) && !isMcpApiKeyPrincipal(user);
|
|
52
|
+
}
|
|
53
|
+
/** `isSignedIn` as a Payload `Access` function. */
|
|
54
|
+
export const signedIn = ({ req }) => isSignedIn(req.user);
|
|
55
|
+
/**
|
|
56
|
+
* An `overrideApiKeyCollection` for `mcpPlugin` that makes the key collection
|
|
57
|
+
* admin-only: read, create, update, delete and unlock all answer to `isAdmin`.
|
|
58
|
+
*
|
|
59
|
+
* `isAdmin` is the site's own rule, since only the site knows what an
|
|
60
|
+
* administrator is. Whatever it says, an MCP key principal is refused first, so
|
|
61
|
+
* a key can never manage keys.
|
|
62
|
+
*
|
|
63
|
+
* It touches `access` and nothing else, so it composes with other overrides:
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* const keysAdminOnly = mcpApiKeyAccess(isAdmin)
|
|
67
|
+
*
|
|
68
|
+
* mcpPlugin({
|
|
69
|
+
* mcp: { tools: mcpTools.tools },
|
|
70
|
+
* overrideApiKeyCollection: collection => {
|
|
71
|
+
* const hardened = keysAdminOnly(collection)
|
|
72
|
+
* return { ...hardened, admin: { ...hardened.admin, group: 'Throughline' } }
|
|
73
|
+
* },
|
|
74
|
+
* })
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* The plugin's field-level rules on the key's `user` relationship are left as
|
|
78
|
+
* shipped: a new key is bound to whoever creates it.
|
|
79
|
+
*/
|
|
80
|
+
export function mcpApiKeyAccess(isAdmin) {
|
|
81
|
+
const adminOnly = args => (isMcpApiKeyPrincipal(args.req.user) ? false : isAdmin(args));
|
|
82
|
+
return collection => ({
|
|
83
|
+
...collection,
|
|
84
|
+
access: {
|
|
85
|
+
...collection.access,
|
|
86
|
+
read: adminOnly,
|
|
87
|
+
create: adminOnly,
|
|
88
|
+
update: adminOnly,
|
|
89
|
+
delete: adminOnly,
|
|
90
|
+
unlock: adminOnly,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=api-key-access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key-access.js","sourceRoot":"","sources":["../../src/mcp/api-key-access.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BE;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,sBAAsB,CAAA;AAKvD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAA4B;IAC/D,OAAQ,IAAoD,EAAE,UAAU,KAAK,iBAAiB,CAAA;AAChG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAA4B;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;AACrD,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,QAAQ,GAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe;IAEf,MAAM,SAAS,GAAW,IAAI,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAE/F,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;QACpB,GAAG,UAAU;QACb,MAAM,EAAE;YACN,GAAG,UAAU,CAAC,MAAM;YACpB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;SAClB;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { McpToolContext } from '../plugin-contract/index.js';
|
|
2
|
+
import type { AuditActor } from '../audit/writer.js';
|
|
3
|
+
import type { McpMeta } from './meta.js';
|
|
4
|
+
/**
|
|
5
|
+
* The audit fields every tool derives from its request rather than from its
|
|
6
|
+
* arguments: who called, and whatever narrative context the client attached.
|
|
7
|
+
*
|
|
8
|
+
* Spread into an `AuditEventInput` alongside the fields the tool itself knows —
|
|
9
|
+
* `action`, `mcpServer`, `mcpTool`, the target.
|
|
10
|
+
*/
|
|
11
|
+
export interface AuditContextFields {
|
|
12
|
+
actor: AuditActor;
|
|
13
|
+
prompt?: string | undefined;
|
|
14
|
+
reasoning?: string | undefined;
|
|
15
|
+
changesSummary?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One answer to "who did this", for every tool in every server.
|
|
19
|
+
*
|
|
20
|
+
* Ten tools built this block by hand and four of them disagreed. Three variants
|
|
21
|
+
* were only untidy — a dropped `userName`, conditional spreads, an assumption
|
|
22
|
+
* that `ctx.user` is non-null. The fourth was wrong: the component tools wrote
|
|
23
|
+
* `type: 'user'` unconditionally, so a call made with an API key and no linked
|
|
24
|
+
* user was recorded as a person. An audit log that cannot tell an agent from an
|
|
25
|
+
* editor is not an audit log, and this is the log the MCP pilot will be judged
|
|
26
|
+
* on.
|
|
27
|
+
*
|
|
28
|
+
* `type` follows the rule `publishing`'s service already used: a call carrying a
|
|
29
|
+
* user is that user's, and one without is the system's. `apiKeyName` rides along
|
|
30
|
+
* either way, because a key acting on behalf of a linked user is still worth
|
|
31
|
+
* naming.
|
|
32
|
+
*
|
|
33
|
+
* `sessionId` is passed through for the first time. The column has existed on
|
|
34
|
+
* the audit collection since it was written and nothing ever filled it; it is
|
|
35
|
+
* what lets somebody reading the log group a whole conversation's writes rather
|
|
36
|
+
* than reading them one at a time.
|
|
37
|
+
*/
|
|
38
|
+
export declare function auditContext(ctx: McpToolContext, meta?: McpMeta): AuditContextFields;
|
|
39
|
+
//# sourceMappingURL=audit-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-context.d.ts","sourceRoot":"","sources":["../../src/mcp/audit-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAIpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAapF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One answer to "who did this", for every tool in every server.
|
|
3
|
+
*
|
|
4
|
+
* Ten tools built this block by hand and four of them disagreed. Three variants
|
|
5
|
+
* were only untidy — a dropped `userName`, conditional spreads, an assumption
|
|
6
|
+
* that `ctx.user` is non-null. The fourth was wrong: the component tools wrote
|
|
7
|
+
* `type: 'user'` unconditionally, so a call made with an API key and no linked
|
|
8
|
+
* user was recorded as a person. An audit log that cannot tell an agent from an
|
|
9
|
+
* editor is not an audit log, and this is the log the MCP pilot will be judged
|
|
10
|
+
* on.
|
|
11
|
+
*
|
|
12
|
+
* `type` follows the rule `publishing`'s service already used: a call carrying a
|
|
13
|
+
* user is that user's, and one without is the system's. `apiKeyName` rides along
|
|
14
|
+
* either way, because a key acting on behalf of a linked user is still worth
|
|
15
|
+
* naming.
|
|
16
|
+
*
|
|
17
|
+
* `sessionId` is passed through for the first time. The column has existed on
|
|
18
|
+
* the audit collection since it was written and nothing ever filled it; it is
|
|
19
|
+
* what lets somebody reading the log group a whole conversation's writes rather
|
|
20
|
+
* than reading them one at a time.
|
|
21
|
+
*/
|
|
22
|
+
export function auditContext(ctx, meta) {
|
|
23
|
+
return {
|
|
24
|
+
actor: {
|
|
25
|
+
type: ctx.user ? 'user' : 'system',
|
|
26
|
+
userId: ctx.user?.id,
|
|
27
|
+
userName: ctx.user?.name,
|
|
28
|
+
apiKeyName: ctx.apiKeyName,
|
|
29
|
+
sessionId: ctx.sessionId,
|
|
30
|
+
},
|
|
31
|
+
prompt: meta?.userPrompt,
|
|
32
|
+
reasoning: meta?.reasoning,
|
|
33
|
+
changesSummary: meta?.changesSummary,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=audit-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-context.js","sourceRoot":"","sources":["../../src/mcp/audit-context.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAmB,EAAE,IAAc;IAC9D,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;YAClC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE;YACpB,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,IAAI;YACxB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB;QACD,MAAM,EAAE,IAAI,EAAE,UAAU;QACxB,SAAS,EAAE,IAAI,EAAE,SAAS;QAC1B,cAAc,EAAE,IAAI,EAAE,cAAc;KACrC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AuditMcpServer } from '../audit/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The audit log's name for a collector server name, or `undefined` if there
|
|
4
|
+
* isn't one.
|
|
5
|
+
*
|
|
6
|
+
* `undefined` rather than a fallback: a row attributed to the wrong server is
|
|
7
|
+
* worse than a boot that stops and says which two lists to reconcile. The
|
|
8
|
+
* caller is `collector.add`, which throws — see `mcpServerRefusal`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function auditServerFor(serverName: string): AuditMcpServer | undefined;
|
|
11
|
+
/** The message `collector.add` throws with when a server has no audit name. */
|
|
12
|
+
export declare function mcpServerRefusal(serverName: string): string;
|
|
13
|
+
//# sourceMappingURL=audit-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-server.d.ts","sourceRoot":"","sources":["../../src/mcp/audit-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAwC1E;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAW7E;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAS3D"}
|