Skip to content

Commit ab83830

Browse files
committed
docs(skills): a flow door's innerRefusal is the refusal any node met, not only a write's
The api skill's flow-door paragraph described `details.innerRefusal` as a write refusal with a three-code list. A data node's refused read fills it too, and so does a `script` node's ambiguous or out-of-reach function name (`RESOURCE_CONFLICT`). The codes are now examples of any `ErrorCode` member. The code-handler table links the `script` node row to the automation skill's package rule instead of restating it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkdBkcn8QBYvVe7z6y
1 parent 26f4e6d commit ab83830

2 files changed

Lines changed: 15 additions & 4 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+
skills(objectstack-api): a flow door's `FLOW_FAILED` `details.innerRefusal` is the refusal any node met, not only a write's
6+
7+
The flow-door paragraph described `innerRefusal` as the refusal "a node's write was refused with" and listed three codes as if they were the set. On `main` it is filled by a data node's refused read or write (any declared 4xx, its code the `ErrorCode` member a record save of the same call answers) and by a `script` node whose function name is ambiguous or outside its package's reach (`RESOURCE_CONFLICT`). The paragraph now says so and gives the codes as examples. The "Choosing between `apis:` and a code handler" table now links the `script` node row to objectstack-automation's package rule (silently-wrong item 3) for which function runs, without restating it.
8+
9+
Clause-②: no
10+
Metadata-protocol: none

‎skills/objectstack-api/SKILL.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ policy layer over an existing pipeline, never a second execution dialect.
130130
| Use | When |
131131
|:---|:---|
132132
| **`defineStack({ apis })`** | The endpoint is a *projection* of something the platform already executes: query/return records, or trigger a flow. No code, no deploy artifact, publish-gated. **Prefer this.** |
133-
| **A flow that runs your code** | The endpoint needs real handler CODE: point a `type: 'flow'` endpoint at a flow whose `script` node names a stack function (`defineStack({ functions })`), or whose `connector_action` node calls a declared connector (outbound). The URL stays declarative; the code runs where the automation surface already runs it. |
133+
| **A flow that runs your code** | The endpoint needs real handler CODE: point a `type: 'flow'` endpoint at a flow whose `script` node names a stack function (`defineStack({ functions })`; which one runs: [objectstack-automation](../objectstack-automation/SKILL.md#valid-but-silently-wrong-passes-build-fails-at-runtime) item 3), or whose `connector_action` node calls a declared connector (outbound). The URL stays declarative; the code runs where the automation surface already runs it. |
134134

135135
An inbound webhook is a `type: 'api'` flow (objectstack-automation →
136136
**Inbound webhook (`api`) triggers**): it verifies ObjectStack's own
@@ -366,9 +366,10 @@ A flow door — `POST /api/v1/automation/{name}/trigger`, resume, `/actions`, a
366366
declared `type: 'flow'` endpoint — answers a failed run with `400 FLOW_FAILED`;
367367
its `error.details` is `FlowFailureDetailsSchema` (`api/automation-api.zod.ts`):
368368
`errorMessage?` (the flow author's text), `summary?` (which node failed) and
369-
`innerRefusal?`, the `{ code, message }` a node's write was refused with, `code`
370-
in its wire spelling (`UNIQUE_VIOLATION`, `VALIDATION_FAILED`,
371-
`PERMISSION_DENIED`). Render it as a record form renders a refused save:
369+
`innerRefusal?`, the `{ code, message }` refusal a node met (a data node's read
370+
or write, a `script` node's function name), `code` an `ErrorCode` member in wire
371+
spelling (e.g. `UNIQUE_VIOLATION`, `PERMISSION_DENIED`, `RESOURCE_CONFLICT`).
372+
Render it as a record form renders a refused save:
372373
top-level `userMessage`, then `details.innerRefusal`, then `message`. Absent
373374
keys mean the run produced none — never invent an empty.
374375

0 commit comments

Comments
 (0)