You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a8f9f1c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec,platform-objects)!: migrate the in-repo action copy to {{ }}; semantic migration entry
#27948, ruling A, step 2:
- migration: semantic entry `action-dialog-outcome-copy-template-holes`
(no conversion: a `${…}` token held an expression, a hole holds a path
and formatters only; `os migrate meta` lists it).
- producers: the invite actions' `sent` / `link_only` outcomes,
`resend_invitation` and `update_member_role` descriptions (the `??`
fallback becomes `| default:'this member'`), the role change's
`permission_set_granted` outcomes, and their en / zh-CN / ja-JP / es-ES
bundles (en regenerates identically); the action form's outcomeMessages
help and the actions guide teach `{{ }}`.
- changeset: Clause-② yes (narrowing), Metadata-protocol narrowed,
ADR-0087 registered.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibwQ8tWwY7TiHQPMCHR
Step 2 of #27948 (ruling A): the five action copy keys speak one hole syntax, ADR-0032's `{{ }}`. `confirmText` and `successMessage` already did (#24814); the param dialog's `description`, each param's `helpText` and each `outcomeMessages` entry now join them.
17
+
18
+
-**The parse.** Each of the three is typed as `confirmText` is: a bare string is shorthand for `{ dialect: 'template', source }` and parses to that envelope; the envelope is taken; `description` and an `outcomeMessages` entry keep the inline locale map they took as an `I18nLabel`, and `helpText` stays without one (it was a plain string). A blank string and a `${…}` sentence still parse, so a stored action loads.
19
+
-**The roots.**`description` and `helpText` read `confirmText`'s roots: `record`, the record the action runs against (a registered action's `params` is the input list the dialog collects, so it binds nothing). An `outcomeMessages` entry reads `successMessage`'s: `result`, the handler's answer, and `record`.
20
+
-**The doors.**`objectstack validate`, `compile` and the publish gate (422) judge each sentence through the same judge as `confirmText`: a `${…}` token, a single-brace `{x}` token, a hole over a root the runner does not bind, a hole holding logic or an unknown formatter, and a blank sentence are errors, each named at its own path (`description`, `params[N].helpText`, `outcomeMessages.OUTCOME`) with its `{{ }}` spelling. An inline `properties.action` is judged on its params' `helpText`.
21
+
-**The readers.** The CLI's i18n extraction seeds the envelope's text exactly as the bare string's, and the MCP `list_actions` param description reads `helpText`'s text, never the object.
22
+
-**The platform's own copy** is rewritten: the invite actions' outcomes (`Invitation sent to {{ result.email }}`), `resend_invitation`'s and `update_member_role`'s descriptions, the role-change `permission_set_granted` outcomes, and their four translation bundles.
23
+
24
+
What to do (FROM → TO, on `description`, `params[].helpText` and `outcomeMessages` entries):
25
+
26
+
-`Resend the invitation to ${record.email}?` → `Resend the invitation to {{ record.email }}?`
27
+
-`Invitation sent to ${result.email}` → `Invitation sent to {{ result.email }}`
28
+
-`${record.owner?.name ?? 'nobody'}` → `{{ record.owner.name | default:'nobody' }}` (the `default` formatter also covers an empty value)
29
+
- other logic in a `${…}` token moves into the handler's answer and is read from `result`.
30
+
31
+
The console keeps filling `${…}` in a stored sentence with no `{{ }}` hole, so stored copy reads as before until its next save, which is judged. `os migrate meta` lists the change (`action-dialog-outcome-copy-template-holes`); no conversion is registered, since a `${…}` token held an expression and a hole holds only a path and formatters.
32
+
33
+
A TypeScript reader of a parsed `ActionSchema` now meets the envelope on these three keys: read its text with `templateSlotSource` (`@objectstack/spec/automation`).
helpText: "Success message per handler outcome, as JSON: each key is a snake_case `outcome` value the handler returns in its success payload, and each value is the label shown for that outcome, e.g. {\"archived\": \"Archived\", \"already_archived\": \"Already archived\"}. A label may interpolate ${result.*}. An outcome with no entry shows the success message; a key the handler never returns is never shown. Not allowed beside a result dialog or `operation: 'update'`."
1828
+
helpText: "Success message per handler outcome, as JSON: each key is a snake_case `outcome` value the handler returns in its success payload, and each value is the label shown for that outcome, e.g. {\"archived\": \"Archived\", \"already_archived\": \"Already archived\"}. A label may hold {{ result.* }} holes. An outcome with no entry shows the success message; a key the handler never returns is never shown. Not allowed beside a result dialog or `operation: 'update'`."
description: "Invite someone by email address. They join this organization with the chosen role when they accept the invitation.",
142
142
successMessage: "Invitation sent to {{ result.email }}",
143
143
outcomeMessages: {
144
-
sent: "Invitation sent to ${result.email}",
145
-
link_only: "Invitation created for ${result.email}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
144
+
sent: "Invitation sent to {{ result.email }}",
145
+
link_only: "Invitation created for {{ result.email }}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
description: "Invite someone by email address. They join this organization with the chosen role when they accept the invitation.",
582
582
successMessage: "Invitation sent to {{ result.email }}",
583
583
outcomeMessages: {
584
-
sent: "Invitation sent to ${result.email}",
585
-
link_only: "Invitation created for ${result.email}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
584
+
sent: "Invitation sent to {{ result.email }}",
585
+
link_only: "Invitation created for {{ result.email }}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
description: "Invite someone by email address. They join this organization with the chosen role when they accept the invitation.",
674
674
successMessage: "Invitation sent to {{ result.email }}",
675
675
outcomeMessages: {
676
-
sent: "Invitation sent to ${result.email}",
677
-
link_only: "Invitation created for ${result.email}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
676
+
sent: "Invitation sent to {{ result.email }}",
677
+
link_only: "Invitation created for {{ result.email }}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
confirmText: "Make the selected member an owner of this organization? They get every owner privilege, including deleting the organization. You stay an owner too; to step down, use Change Role on your own membership.",
722
722
successMessage: "Member is now an owner",
723
723
outcomeMessages: {
724
-
permission_set_granted: "Member is now an owner. The new role also granted the permission set ${result.grantedPermissionSet.label}."
724
+
permission_set_granted: "Member is now an owner. The new role also granted the permission set {{ result.grantedPermissionSet.label }}."
description: "Invite someone by email address. They join this organization with the chosen role when they accept the invitation.",
826
826
successMessage: "Invitation sent to {{ result.email }}",
827
827
outcomeMessages: {
828
-
sent: "Invitation sent to ${result.email}",
829
-
link_only: "Invitation created for ${result.email}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
828
+
sent: "Invitation sent to {{ result.email }}",
829
+
link_only: "Invitation created for {{ result.email }}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
description: "Resend the invitation to ${record.email}? Its expiry date starts over.",
851
+
description: "Resend the invitation to {{ record.email }}? Its expiry date starts over.",
852
852
successMessage: "Invitation resent",
853
853
outcomeMessages: {
854
-
sent: "Invitation resent to ${result.email}",
855
-
link_only: "Invitation renewed for ${result.email}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
854
+
sent: "Invitation resent to {{ result.email }}",
855
+
link_only: "Invitation renewed for {{ result.email }}. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it."
helpText: "Mensaje de éxito por cada resultado del manejador, en JSON: cada clave es un valor `outcome` en snake_case que el manejador devuelve en su carga útil de éxito, y cada valor es la etiqueta que se muestra para ese resultado, p. ej., {\"archived\": \"Archivado\", \"already_archived\": \"Ya estaba archivado\"}. Una etiqueta puede interpolar ${result.*}. Un resultado sin entrada muestra el mensaje de éxito; una clave que el manejador nunca devuelve no se muestra nunca. No se admite junto a un diálogo de resultado ni con `operation: 'update'`."
1828
+
helpText: "Mensaje de éxito por cada resultado del manejador, en JSON: cada clave es un valor `outcome` en snake_case que el manejador devuelve en su carga útil de éxito, y cada valor es la etiqueta que se muestra para ese resultado, p. ej., {\"archived\": \"Archivado\", \"already_archived\": \"Ya estaba archivado\"}. Una etiqueta puede interpolar {{ result.* }}. Un resultado sin entrada muestra el mensaje de éxito; una clave que el manejador nunca devuelve no se muestra nunca. No se admite junto a un diálogo de resultado ni con `operation: 'update'`."
description: "Invita a alguien por su dirección de correo electrónico. Se une a esta organización con el rol elegido cuando acepta la invitación.",
142
142
successMessage: "Invitación enviada a {{ result.email }}",
143
143
outcomeMessages: {
144
-
sent: "Invitación enviada a ${result.email}",
145
-
link_only: "Invitación creada para ${result.email}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
144
+
sent: "Invitación enviada a {{ result.email }}",
145
+
link_only: "Invitación creada para {{ result.email }}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
description: "Invita a alguien por su dirección de correo electrónico. Se une a esta organización con el rol elegido cuando acepta la invitación.",
582
582
successMessage: "Invitación enviada a {{ result.email }}",
583
583
outcomeMessages: {
584
-
sent: "Invitación enviada a ${result.email}",
585
-
link_only: "Invitación creada para ${result.email}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
584
+
sent: "Invitación enviada a {{ result.email }}",
585
+
link_only: "Invitación creada para {{ result.email }}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
description: "Invita a alguien por su dirección de correo electrónico. Se une a esta organización con el rol elegido cuando acepta la invitación.",
674
674
successMessage: "Invitación enviada a {{ result.email }}",
675
675
outcomeMessages: {
676
-
sent: "Invitación enviada a ${result.email}",
677
-
link_only: "Invitación creada para ${result.email}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
676
+
sent: "Invitación enviada a {{ result.email }}",
677
+
link_only: "Invitación creada para {{ result.email }}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
confirmText: "¿Hacer propietario de esta organización al miembro seleccionado? Obtendrá todos los privilegios de propietario, incluido eliminar la organización. Tú sigues siendo propietario; para dejar de serlo, usa «Cambiar rol» en tu propia membresía.",
722
722
successMessage: "El miembro ahora es propietario",
723
723
outcomeMessages: {
724
-
permission_set_granted: "El miembro ahora es propietario. El nuevo rol también concedió el conjunto de permisos ${result.grantedPermissionSet.label}."
724
+
permission_set_granted: "El miembro ahora es propietario. El nuevo rol también concedió el conjunto de permisos {{ result.grantedPermissionSet.label }}."
description: "Invita a alguien por su dirección de correo electrónico. Se une a esta organización con el rol elegido cuando acepta la invitación.",
826
826
successMessage: "Invitación enviada a {{ result.email }}",
827
827
outcomeMessages: {
828
-
sent: "Invitación enviada a ${result.email}",
829
-
link_only: "Invitación creada para ${result.email}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
828
+
sent: "Invitación enviada a {{ result.email }}",
829
+
link_only: "Invitación creada para {{ result.email }}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
description: "¿Reenviar la invitación a ${record.email}? Su plazo de vencimiento vuelve a empezar.",
851
+
description: "¿Reenviar la invitación a {{ record.email }}? Su plazo de vencimiento vuelve a empezar.",
852
852
successMessage: "Invitación reenviada",
853
853
outcomeMessages: {
854
-
sent: "Invitación reenviada a ${result.email}",
855
-
link_only: "Invitación renovada para ${result.email}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
854
+
sent: "Invitación reenviada a {{ result.email }}",
855
+
link_only: "Invitación renovada para {{ result.email }}. El correo no está configurado en este servidor, así que no ha salido ningún mensaje. Usa Copiar enlace de invitación en la invitación para compartirla."
0 commit comments