[translator] Open the seam to hosts: export the module type and provenance()
I maintainer di solito rispondono entro 1 giorno
@SearheiParkhamchuk ci sta già lavorando.
Dal 21/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Step 9 of the next major, and the last one. Not part of the next major. No caller passes a host-written module and nothing asks for one: apps/cms/src/lib/plugins/index.ts:403 passes [documentTranslation()], apps/dev/src/payload.config.ts:104 passes [documentTranslation(), fieldTranslation()], and apps/dev/src/integration/translator/bootTestPayload.ts:215 passes the same two. Both factories are already exported. Publishing TranslationModule would publish ModuleContext with it — access, the schema map, the translation provider and the right to add endpoints — which is a wide first promise to make for nobody. Same reasoning as #203.
The module seam becomes public: the module type and provenance() are exported, and the plugin accepts host modules. It comes last because the engine's extraction deliberately breaks the internal package's interface, and nothing is promised to hosts before that has settled. That condition is now met — the engine was separated and the address seam rebuilt — but it was never the only one. The missing one is a consumer.
Five questions are settled by writing a host module against the draft rather than by argument:
what a module failure before the save means, and whether provenance declares it skippable;- how provenance is switched on — keep the boolean flag, or move to a module list and deprecate the flag;
what the admin does when the staleness route is absent, given those routes register today even when provenance is off;- what the package entry exports, at minimum the module type and
provenance(); - whether a component may state the abilities it needs, turning a control that can never work into one message at startup.
Depends on: the traversal engine, and the provider port.
Part of #192.
What changed since this was written (2026-11-14)
A module failure before the save is already decided. src/server/modules/translation-run/runChain.ts:18-20 states the rule and its reason: a module is handed payload and may query it, so a failure it raises is assumed to have taken the caller's transaction; swallowOrThrow decides and the chain does not second-guess it, because adopting a module's failure as harmless would also demote one a module raised deliberately. Only the second half of that bullet is open, and it has moved to its own issue.
The staleness bullet rested on something that is no longer true. Those routes are registered inside the provenance module's own setup (src/server/modules/provenance/Provenance.module.ts:51-54), and that module enters the chain only when the flag is on (src/plugin.ts:243-247). Pinned by src/__tests__/plugin.test.ts:64 and :74. #198 closed on 23 October and is what made it false — two days after this issue was written.
The admin's side of that bullet is owned elsewhere. docs/plans/2026-11-13-admin-ui-1.0.research.md R8 and its state table already decide what the panel shows with provenance off. Deciding it here as well is how two answers happen.
There is no provenance() to export. The nearest thing, configureProvenance (src/server/modules/provenance/Provenance.wiring.ts:80), takes a fingerprinter built from the walk and the schema map — values a host does not hold. A host-facing factory would be new API design, not a re-export.
The abilities bullet is an extension, not an invention. RunnerCapabilities (src/server/modules/task-runner/RunnerCapabilities.ts) already does this for runners: declared at config time because routes are built before any payload exists, so a control that cannot work is never drawn, and assertTaskRunnerContract checks the declaration is honest. Extending it to admin components pays once a host writes one.
Research: packages/payload-plugin-translator/docs/plans/2026-11-14-open-the-module-seam.md.
- Lingua principale
- TypeScript
- Stelle
- 34
- Fork
- 5
- Merge medio
- 2g 4h
- PR unite (30g)
- 41
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di focusreactive/payload-plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
focusreactive/payload-plugins#279 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
focusreactive/payload-plugins#263 ·
I maintainer di solito rispondono entro 1 giorno
-
comments, seo, analytics, and presets publish ESM that fails to load in Node.js (follow-up to #149)Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
focusreactive/payload-plugins#240 ·
I maintainer di solito rispondono entro 1 giorno
-
released released on @next
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
focusreactive/payload-plugins#210 · 10 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[translator] Re-extract the traversal engine into its own packageForse di nuovo libera @SearheiParkhamchuk l’ha presa 41 giorni fa e non c’è nessuna pull request aperta. Apertachore low priority translator
focusreactive/payload-plugins#203 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di focusreactive/payload-plugins
Issue simili
-
verified whatsapp
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 6 giorni
-
Feature: use a darkmode logoAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
openidconnect: option to use client_secret_post (client_id with "-" rejected by LemonLDAP::NG 2.21)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Amélioration du résumé regAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
MTES-MCT/monitorenv#3257 ·
I maintainer di solito rispondono entro 1 giorno