Skip to content

Commit 597efdf

Browse files
committed
docs(skills): scope decision-output resolution per kind and add the skills changeset
Answers the contract review of 1912f51: the organization scope now applies only to the kinds the approvals service scopes (a user id from any account resolves), the paragraph keeps that a typed entry renders the matching picker, a blank value is left to required, and the change ships an '@objectstack/skills' patch changeset since skills/** publishes. Paid by three example comments that restate the Node Config table rows. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkWdcYL2ftVcWZ2scY
1 parent 1912f51 commit 597efdf

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the automation skill teaches that an approval's decision outputs are enforced at the decision
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `decisionOutputs` teaching in objectstack-automation's state-machines-and-approvals reference said only that a typed entry renders a record picker in the decision dialog. It now also says what the approvals service enforces, on approve and reject alike and before any write: a picker value must resolve through the `expression` approver's resolvers (`user` by any account's record id, `department` by record id in the request's organization, `team` by record id not owned by another organization, `position` by the machine name of a position someone in that organization holds); `multiple: true` takes a list of distinct values for every kind, bare keys included, and without it one value; any other non-blank value is refused with `400 VALIDATION_FAILED` naming `outputs.KEY`. The Console sends a list for a `multiple: true` text output. No schema, key or behaviour changes.

‎skills/objectstack-automation/references/state-machines-and-approvals.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ is one diagram a reviewer (or AI) can read end-to-end.
9696
label: 'Sales Manager Review',
9797
config: {
9898
approvers: [{ type: 'position', value: 'sales_manager' }],
99-
behavior: 'first_response', // or 'unanimous' / 'quorum' / 'per_group'
100-
lockRecord: true, // lock the record while pending
101-
approvalStatusField: 'approval_status', // mirror pending|approved|rejected|recalled onto the row
99+
behavior: 'first_response',
100+
lockRecord: true,
101+
approvalStatusField: 'approval_status',
102102
},
103103
},
104104
// Decision routing lives on the OUT-EDGES, not in node config: the engine
@@ -219,12 +219,14 @@ reject) — enforced before any write, with no elevation bypass, so the run
219219
cannot resume past the node with the key a later `expression` approver reads
220220
still missing.
221221

222-
`type` and `multiple` are enforced at the decision too, on approve and reject alike,
223-
before any write — they are not widget hints. A picker kind must resolve
224-
through the `expression` approver's resolvers in the request's organization:
225-
`user`, `department` and `team` by record id, `position` by a held position's
226-
machine name. `multiple: true` takes a list of distinct values (every kind,
227-
text and bare keys included); without it, one value. Anything else is
222+
A typed entry renders the matching picker in the decision dialog, and `type`
223+
and `multiple` are also enforced at the decision, on approve and reject alike,
224+
before any write. A picker value must resolve through the `expression`
225+
approver's resolvers: `user` by any account's record id, `department` by record
226+
id in the request's organization, `team` by record id (not another
227+
organization's), `position` by the machine name of a position someone in that
228+
organization holds. `multiple: true` takes a list of distinct values (every
229+
kind, bare keys included); without it, one value. Any other non-blank value is
228230
`400 VALIDATION_FAILED` naming `outputs.KEY`. The Console sends a list for a
229231
`multiple: true` text output. The `lead_review` node below is the example.
230232

0 commit comments

Comments
 (0)