Repository navigation
feat(apollo-react): curated copy for built-in centralized guardrail parameters such as Applies to - #1302
feat(apollo-react): curated copy for built-in centralized guardrail parameters such as Applies to#1302apetraru-uipath wants to merge 2 commits into
Conversation
…ch as Applies to
Agents now stamps an appliesTo scope (Text / Files / Both) onto the
built-in guardrails a governance policy enforces on files, and the judge
carries its rule, model, strictness and examples as parameters. The
centralized details already appended a built-in's own parameters after
its lifted entity rows, but labelled them only from a matching
definition, so appliesTo showed as "appliesTo: Files" and the judge's
settings as raw ids whenever the tenant's catalog did not declare them.
A parameter the definition does not declare now takes its label and
option names from the curated copy for the validator ("Rule prompt",
"Languages"), and appliesTo from a fallback the details own: "Applies
to", "Text only", "Files only", "Text and files", the copy the
per-agent builder gets from the backend definition. A definition that
does declare the parameter still wins, the lifted rows are unchanged,
a lifted field still hides a parameter repeating its id, and BYO rows
never borrow curated copy. A list the value formatter cannot name item
by item falls back to JSON rather than an empty row.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…rs the copy describes The centralized details appended the definitions it synthesised for a built-in's undeclared parameters onto the definition list that orders the rows, so a parameter the curated copy or the appliesTo fallback could name sorted ahead of an undeclared one it could not, against the policy's order the row contract promises. Those definitions are now looked up by id only, so every undeclared parameter keeps its place and nothing is ever pushed onto the host's definition array; a test pins that array unchanged after resolving, and another the mixed order. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The newly required fields break consumers of the exported label interface.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds curated display copy for undeclared built-in guardrail parameters.
Changes:
- Resolves parameter labels and
appliesTovalues from localized copy. - Preserves parameter ordering and formats record lists as JSON.
- Adds stories, documentation, and comprehensive tests.
| File | Description |
|---|---|
locales/en.json |
Adds English appliesTo translations. |
Guardrails/README.md |
Documents parameter fallback behavior. |
Guardrails/i18n.ts |
Defines localized fallback labels. |
Guardrails/i18n.test.ts |
Verifies English label copy. |
Guardrails/centralized-parity.test.ts |
Records host-copy parity. |
Guardrails/centralized-guardrails.stories.tsx |
Demonstrates built-in parameters. |
Guardrails/centralized-guardrail-utils.ts |
Resolves curated labels and values. |
Guardrails/centralized-guardrail-utils.test.ts |
Tests resolver behavior and edge cases. |
Guardrails/centralized-guardrail-details.tsx |
Supplies copy and fallback labels. |
Guardrails/centralized-guardrail-details.test.tsx |
Tests rendered labels and accessibility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| appliesToFallback: string; | ||
| appliesToText: string; | ||
| appliesToFiles: string; | ||
| appliesToBoth: string; |
| products render today. A built-in's own parameters the definition does not declare take the | ||
| curated copy for the validator ("Rule prompt", "Languages"), and `appliesTo`, which Agents | ||
| stamps onto every built-in it enforces on files, the details' own "Applies to" / "Files | ||
| only" fallback, so the dialog reads as the per-agent builder does. |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
Storybook visual diffBaseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs Updated (PT): Oct 07, 2026, 06:41:25 AM |


What changed
CentralizedGuardrailDetailsalready lists a built-in guardrail's ownparametersafter the lifted entities and thresholds (AL-620), but a parameter the matching definition does not declare was shown with its raw id and raw value:appliesTo/Files. Agents now stamps exactly that parameter on centralized PII, prompt-attack, harmful-content and LLM-as-judge guardrails (UiPath/Agents#6545, AL-606), and the definition does not carryappliesTowhen the file-support flags are off or on Automation Suite — which is when the policy value must still be readable.resolveCentralizedGuardrailParameterstakes the optionalcopytable the details component already holds. For a built-in parameter the definition does not declare, the label and option labels come from the curated validator copy (so the judge'sguardrailText/model/threshold/examples read as in the builder), else from a sharedappliesTofallback: "Applies to", with "Text only" / "Files only" / "Text and files" — the builder's copy. Nothing known → the row keeps its raw id, as before.definition.parametersis never mutated.formatValue: a list of records renders as JSON instead of an empty row; string lists still join with ", ".CentralizedParameterFallbackLabels.appliesTois an optional group, so hosts calling the exported resolver with the old shape keep compiling.guardrails.centralized.applies-to-*ini18n.tsandlocales/en.json(other catalogs via the l10n sync); parity test entries; a "Built-in parameters" story (PII withappliesTo=Files, judge with all five params +appliesTo=Both, sentiment withlanguage); README sentence.How has this been tested
vitest src/canvas/components/Guardrails: 39 files, 978 tests pass (18 new: fallback copy for each option and unknown value, definition copy preferred over fallback, curated copy for judge params and sentiment language, declared order first then policy order, a repeated id described once, BYO never borrows copy, definition left untouched, JSON fallback for record lists, details render "Applies to" / "Files only" under the thresholds, judge with no definition shows all rows, axe).pnpm test: 3861 pass; the 1 failure is the known local locale-data test inStageNode/formatDuration, identical onmain.biome lint(0 errors),format:check,tsc --noEmitand the package build are clean.Consumer: UiPath/Agents bumps
@uipath/apollo-reactto the release carrying this so the Apollo centralized dialog shows the scope.🤖 Generated with Claude Code