feat(approvals): typed decisionOutputs — record pickers for decision-output fields (#3447) - #3554
Merged
Merged
Conversation
…output fields (#3447) A decisionOutputs entry may be { key, label?, type, multiple? } alongside the bare string: typed entries render sys_user / business-unit / position / team pickers in the decision dialog (multiple → id array) instead of free text. normalizeDecisionOutputs (spec) is the one reader of the union — service whitelist, request read and os lint all key off it, so bare and typed can never behave differently. The request read adds decision_output_defs next to the skew-safe decision_outputs key list; the showcase demo flow and SKILL.md adopt the typed form, and the end-to-end skill example is now os:check'd (compiled against the spec in CI). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 104 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #3447 P2 (#3532/#3538): a
decisionOutputsentry may now be a typed declaration alongside the bare-string form:A typed entry tells the decision UI to render the matching record picker —
user→ sys_user,department→ sys_business_unit,position→ sys_position,team→ sys_team;multiplecollects an id array (the natural fan-out shape for a downstreamexpressionapprover). This upgrades the scenario-② input experience from "paste user ids into a text box" to "pick people". objectui consumes it in the paired PR (renders pickers fromdecision_output_defs).Design
keyfor both forms, via the newnormalizeDecisionOutputshelper exported from@objectstack/spec/automation— the single reader of the union consumed by the service whitelist, the request read, andos lint, so a bare key and{ key }can never behave differently.decision_outputs: string[](older consoles keep rendering text inputs) and addsdecision_output_defs(normalized declarations) for picker-aware consoles.string[]values — the outputs channel has accepted arbitrary JSON since P2 (the integration tests use arrays).showcase_dynamic_approvaldemo flow adopts the typed form; SKILL.md documents it and its end-to-end example is now a fulldefineFlowunder<!-- os:check -->(type-checked against the spec in CI — 33 examples green).Tests
plugin-approvals 193 (new: typed normalize → key-list + defs surfacing + typed whitelist accepts array outputs), lint 335 (new: reserved-key check inside typed declarations). Generators re-run; spec/plugin DTS builds green.
🤖 Generated with Claude Code