From ab838308e99fb0162d081f2bbdc96854a6a4c1da Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 05:09:00 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01J8VVAkdBkcn8QBYvVe7z6y --- .changeset/32379-api-flow-inner-refusal-any-node.md | 10 ++++++++++ skills/objectstack-api/SKILL.md | 9 +++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .changeset/32379-api-flow-inner-refusal-any-node.md diff --git a/.changeset/32379-api-flow-inner-refusal-any-node.md b/.changeset/32379-api-flow-inner-refusal-any-node.md new file mode 100644 index 00000000000..637afef6432 --- /dev/null +++ b/.changeset/32379-api-flow-inner-refusal-any-node.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +skills(objectstack-api): a flow door's `FLOW_FAILED` `details.innerRefusal` is the refusal any node met, not only a write's + +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. + +Clause-②: no +Metadata-protocol: none diff --git a/skills/objectstack-api/SKILL.md b/skills/objectstack-api/SKILL.md index d1a06771723..5b0d15ab30c 100644 --- a/skills/objectstack-api/SKILL.md +++ b/skills/objectstack-api/SKILL.md @@ -130,7 +130,7 @@ policy layer over an existing pipeline, never a second execution dialect. | Use | When | |:---|:---| | **`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.** | -| **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. | +| **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. | An inbound webhook is a `type: 'api'` flow (objectstack-automation → **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 declared `type: 'flow'` endpoint — answers a failed run with `400 FLOW_FAILED`; its `error.details` is `FlowFailureDetailsSchema` (`api/automation-api.zod.ts`): `errorMessage?` (the flow author's text), `summary?` (which node failed) and -`innerRefusal?`, the `{ code, message }` a node's write was refused with, `code` -in its wire spelling (`UNIQUE_VIOLATION`, `VALIDATION_FAILED`, -`PERMISSION_DENIED`). Render it as a record form renders a refused save: +`innerRefusal?`, the `{ code, message }` refusal a node met (a data node's read +or write, a `script` node's function name), `code` an `ErrorCode` member in wire +spelling (e.g. `UNIQUE_VIOLATION`, `PERMISSION_DENIED`, `RESOURCE_CONFLICT`). +Render it as a record form renders a refused save: top-level `userMessage`, then `details.innerRefusal`, then `message`. Absent keys mean the run produced none — never invent an empty.