Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/34279-automation-hook-connector-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@objectstack/skills': patch
---

docs(skills): objectstack-automation names the inbound hook's answer for a disabled package's flow, and the refusal of an undeclared `connector_action` input key

Clause-②: no
Metadata-protocol: none

The inbound hook section gains one bullet: a flow whose package is disabled answers the door's `401 INVALID_SIGNATURE` at both its bare and its qualified address, with nothing enqueued, and a sender's retry is accepted (`202`) once the package is enabled. Text only; the neighbouring bullets are tightened to pay for it.

The `connector_action` row and the integration recipes now say that an input key the action's `inputSchema` does not declare fails the step before dispatch, and that on an OpenAPI document nobody de-referenced a `$ref` parameter or a `$ref` / schemaless request body reads as open input, sent unjudged (a `$ref` response is still silently lost).
19 changes: 10 additions & 9 deletions skills/objectstack-automation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Built-in (plugins register more; a `type` none runs is refused at a server's pub
|:-----|:--------|
| `http` | Call an HTTP API — set `timeoutMs`, or it has no timeout and warns (`flow-http-timeout-missing`). `url` and `headers` are served as written with the definition to every member who can read flows — only `signingSecret` and a start node's `secret` are withheld — so never a credential there: use a declared connector via `connector_action`. Retried after a record change: `durable: true` (outbox-queued, else sent once in the background, unretried; no response) |
| `notify` | Send a notification (below) |
| `connector_action` | Dispatch an action of a declared connector (§ *Integrations are declared, not coded*) or a plugin's. `connectorConfig.input` is a value-slot map like `subflow` `input`. Once evaluated, it is judged against the action's `inputSchema` (`required`, `type`, `properties`, `items`) before dispatch: a breach fails the step `VALIDATION_ERROR` (`fault`-routable); `os validate` does not judge the `inputSchema` fit yet. Retried after a record change: drop the retry, or run the flow on demand / on a schedule |
| `connector_action` | Dispatch an action of a declared connector (§ *Integrations are declared, not coded*) or a plugin's. `connectorConfig.input` is a value-slot map like `subflow` `input`. Evaluated, it is judged against the action's `inputSchema` (`required`, `type`, `items`, a key outside listed `properties`) before dispatch: a breach fails the step `VALIDATION_ERROR` (`fault`-routable); `os validate` does not judge that fit yet. Retried after a record change: drop the retry, or run the flow on demand / on a schedule |
| `script` | Call a **registered** function (*Valid-but-silently-wrong* #3) |
| `screen` | Display a UI form (screen flows only). `config.fields[]`: `{ name, label, type, required, options, defaultValue }`, `type` an open widget hint; `'file'` renders the upload widget and resumes with the `sys_file` id bound to `name` — a later `create_record` / `update_record` writes it into a `file` field, which claims the file: collect first, write after the last screen. `'record_link'` (never `'record'`, an object field type) takes no input — it shows the `reference` record whose id `defaultValue` evaluates to, by display name, as a link to its record page: the result screen of a flow that created records, `{ name: 'account_link', type: 'record_link', reference: 'crm_account', defaultValue: { dialect: 'cel', source: 'account.id' } }` over a `create_record` `outputVariable: 'account'`. Both keys required; `required` / `options` / `placeholder` / `min` / `max` refused; a resume value under its name refused (`400 INVALID_SCREEN_INPUT`). A completed `end` `message` is refused and a markdown link in a screen `description` renders literally. Next / Submit and "Step N of M" are not authored: the engine reads the graph when the screen pauses and serves `progress`, which alone labels the button and draws the counter. A `decision`, `fault` edge, loop back, non-screen pause (`approval`, `wait`) or `subflow` after a screen means "Next", no count. `progress` in a node `config` is refused |

Expand Down Expand Up @@ -399,19 +399,20 @@ token implies the other:

### Inbound webhook (`api`) triggers (ADR-0041 Tier 1)

Endpoint: `POST /api/v1/automation/hooks/:flowName/:hookId`. Configure it on
the **start node `config`**:
`POST /api/v1/automation/hooks/:flowName/:hookId`, configured on the
**start node `config`**:

| `config` key | Purpose |
|:-------------|:--------|
|:--|:--|
| `hookId` | URL path token (default `'default'`). **Rotate it to revoke** a leaked endpoint |
| `secretRef` / `secret` | HMAC-SHA256 secret, **one required** (else refused at registration and `os validate`). Ship `secretRef: 'NAME'`: an env var the deployment fills, not `OS_*`; unfilled ⇒ `503`. Never a literal |

- **Signature:** `x-objectstack-signature: t=<unix seconds>,v1=<hex>` — HMAC-SHA256 of `<t>.<raw body>`; `t` within 300 s. Vendor-signed: `config.signature` replaces it (recipe 4).
- **Idempotency:** `x-idempotency-key` dedupes retries — author the flow to be idempotent (delivery is at-least-once).
- **Queue-backed:** the endpoint ACKs `202` and enqueues; the flow runs on the consumer.
- The JSON body surfaces to the flow as the trigger record (`record.*` / bare fields) plus `params`.
- **A flow name two packages hold:** the bare hook above answers `401 INVALID_SIGNATURE` whatever the signature (cause: server log only). Each package's flow is reached only at `POST /api/v1/automation/hooks/:namespace/:flowName/:hookId`, by its `manifest.namespace` (`_env` there: a flow no package ships).
- **Signature:** `x-objectstack-signature: t=<unix seconds>,v1=<hex>` — HMAC of `<t>.<raw body>`; `t` within 300 s. Vendor-signed: `config.signature` replaces it (recipe 4).
- **Idempotency:** `x-idempotency-key` dedupes retries — delivery is at-least-once: author the flow idempotent.
- **Queue-backed:** it ACKs `202` and enqueues; the flow runs on the consumer.
- The JSON body is the flow's trigger record (`record.*` / bare fields) plus `params`.
- **A flow name two packages hold:** the bare hook answers `401 INVALID_SIGNATURE` whatever the signature (cause: server log only). Each package's flow answers only at `…/hooks/:namespace/:flowName/:hookId`, by its `manifest.namespace` (`_env`: a flow no package ships).
- **A disabled package's flow:** that `401` at both addresses, nothing enqueued; once enabled, a sender's retry gets `202`.

### Trigger Types (start-node `config.triggerType`)

Expand Down
10 changes: 5 additions & 5 deletions skills/objectstack-automation/references/integration-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ an unset ref leaves its instance degraded until set. Keep `automation` in
the `rest` provider's single `request`) — authored on the entry, they are refused.
- `connectorConfig.input` is a value-slot map: a top-level CEL envelope is evaluated, any other value kept as written,
so a value from the record is a CEL envelope. The pre-dispatch `inputSchema`
judgement honours OpenAPI `nullable`, reads `null` on an optional parameter
judgement refuses an undeclared key, honours OpenAPI `nullable`, reads `null` on an optional parameter
as absent and names each breached path. Text is never converted: cast a
string-held id, `path: { dialect: 'cel', source: '{"petId": int(record.vendor_id)}' }`.
- The answer lands as `<nodeId>.<key>` (`rest` / `openapi`: `{ status, ok, body }`;
Expand Down Expand Up @@ -59,10 +59,10 @@ export const StripeBalanceSweep = defineFlow({
```

`requires: ['automation', 'triggers']`. Convert Swagger 2.0 or YAML and
dereference every `$ref` offline, in-document ones included: the loader skips a
`$ref` parameter, request body or response and the derived schema silently
loses it. `providerConfig.include` allowlists operation keys as the
`mcp` provider's does (absent = every operation; a non-array or unknown entry is
dereference every `$ref` offline, in-document too: a `$ref` response is
silently lost; a `$ref` parameter or `$ref` / schemaless body is open input,
sent unjudged. `providerConfig.include` allowlists operation keys as the
`mcp` provider's does (absent = all; a non-array or unknown entry is
fatal).

## 2 · Remote MCP server, static header — GitHub
Expand Down
Loading