Skip to content

Commit e26acdd

Browse files
committed
docs(skills,automation): connectorConfig.input is judged at publish since #27968
With the #27968 fix on main, registerFlow and os validate refuse a {…} token (and a malformed or template envelope) in connectorConfig.input at connectorConfig.input.<key>, so the recipe's "{…}, {{ }} are literal text" is no longer true. The connector_action row and recipe Holds bullet 2 now teach the publish-time refusal, that a value from the record is a CEL envelope, and the run-time inputSchema check that os validate does not perform yet. Recipe 4 gets its runAs reason back. Eval 1's rubric names the inputSchema check and drops a clause the recipe no longer teaches; its must_contain tokens are unchanged. Paid by same-file restatement cuts: SKILL.md drops the record_change row's binding aside (the Trigger Types heading names the start node's config.triggerType), the node-types lead's "e.g. approval" (the requires table names the plugin), "bare CEL;" in the trigger example (rule 4 and the CEL blockquote) and "the surface just never runs" (the requires table's Absent column); the recipe drops the answer bullet's CEL example (recipe 1 reads the same path), recipe 1's "admin sets" comment (the intro says the administrator supplies the ref), the "ship it in the package" clause (the intro says a spec ships in the package) and the signing bullet's "same handling" (the section heading). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwp1Wc6nB6ePmS4ePn
1 parent 3c516fe commit e26acdd

3 files changed

Lines changed: 21 additions & 23 deletions

File tree

‎skills/objectstack-automation/SKILL.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ A **Flow** is a directed graph of nodes — the primary automation building bloc
4646
| `autolaunched` | Runs without user interaction — triggered by events, APIs, or other flows |
4747
| `screen` | Interactive — presents UI screens to the user (wizards, forms) |
4848
| `schedule` | Runs on a cron/interval cadence declared on the **start node's `config.schedule`** — or a **per-record date sweep** via `config.timeRelative`, see *Time-relative triggers* |
49-
| `record_change` | Fires automatically on record create/update/delete (bind via the `start` node's `triggerType`). `autolaunched` + the same `record-*` binding behaves identically; `record_change` also opts into the trigger-readiness lint |
49+
| `record_change` | Fires automatically on record create/update/delete. `autolaunched` + the same `record-*` binding behaves identically; `record_change` also opts into the trigger-readiness lint |
5050
| `api` | Inbound **webhook** — needs a start-node `secretRef` (or a literal `secret`; see *Inbound webhook triggers* below); a flow only ever started explicitly is `autolaunched` |
5151

5252
### Flow Node Types
5353

54-
Flows are built from **built-in node types** (plugins register more, e.g.
55-
`approval`):
54+
Flows are built from **built-in node types** (plugins register more):
5655

5756
#### Control Flow
5857

@@ -85,7 +84,7 @@ Flows are built from **built-in node types** (plugins register more, e.g.
8584
|:-----|:--------|
8685
| `http` | Call an external HTTP API — always set `timeoutMs` (unset = no timeout). `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: a credential means a declared connector called via `connector_action` |
8786
| `notify` | Send a notification through the messaging service (inbox by default) |
88-
| `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`, judged once evaluated against the action's `inputSchema` (`required`, `type`, `properties`, `items`) before dispatch: a breach fails the step `VALIDATION_ERROR` (`fault`-routable), nothing sent. `os validate` does not judge the `inputSchema` fit yet |
87+
| `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`: `registerFlow` and `os validate` refuse a `{…}` token at `connectorConfig.input.<key>`. 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), nothing sent; `os validate` does not judge the `inputSchema` fit yet |
8988
| `script` | Call a **registered** function named by `config.function` (see *Valid-but-silently-wrong* #3) |
9089
| `screen` | Display a UI form to the user (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` (`nextScreen: 'none' | 'possible' | 'certain'`; `step` / `stepCount` only when every path agrees), 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 answers `possible` — "Next", no count. `progress` in a node `config` is refused; never hand-roll a button label or step counter into `fields` |
9190

@@ -328,9 +327,9 @@ node's `config`.
328327

329328
### Prerequisite — declare the capabilities your nodes need
330329

331-
Metadata registers without its `defineStack({ requires })` token; the surface
332-
just never runs. Two pairs are instead **refused** at `os validate` / `build` /
333-
`dev` / `serve` (422); neither token implies the other:
330+
Metadata registers without its `defineStack({ requires })` token. Two pairs are
331+
instead **refused** at `os validate` / `build` / `dev` / `serve` (422); neither
332+
token implies the other:
334333

335334
| `requires` token | Turns on | Absent ⇒ |
336335
|:--|:--|:--|
@@ -383,7 +382,7 @@ owns `label`, `type`, `nodes` and the `edges` `FlowSchema` requires):
383382
config: {
384383
objectName: 'support_case',
385384
triggerType: 'record-after-update',
386-
// bare CEL; gates whether the flow launches on the event
385+
// gates whether the flow launches on the event
387386
condition: "previous.status != 'escalated' && record.status == 'escalated'",
388387
},
389388
}

‎skills/objectstack-automation/evals/integrations-declared.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"id": 1,
66
"prompt": "Our contract-lifecycle app (objects `contract`, `crm_account`) needs DocuSign: send a contract out for signature, read an envelope's status, and reflect status changes on the record. DocuSign publishes a 4.7 MB Swagger 2.0 document with several hundred operations, authenticates with OAuth 2.0, and its Connect webhooks sign posts with their own HMAC header. Propose what to build and where.",
7-
"expected_output": "A declarative instance inside the app, not a platform plugin and not a `connector-esign` family: `defineConnector` with `provider: 'openapi'`, whose `providerConfig.spec` is a packaged OpenAPI 3.x document converted offline from the Swagger 2.0 document and trimmed to the three operations (create envelope, get envelope, list status changes) (or `providerConfig.include` names those three operation keys, the `mcp` provider's allowlist meaning, where a non-array or unknown entry is fatal; trimming still keeps the package small). Fields on `contract` (`envelope_id`, `signature_status`). Flows dispatch `connector_action`; the callback is an `api` flow with a start-node `secretRef`. Two gaps are named plainly, each blocked on its platform card: the declarative `auth` union has no `oauth2`, so the integration is marked **blocked** on outbound OAuth (no short-lived token parked behind a `bearer` `credentialRef`); DocuSign Connect signs its own header, which the `api` door does not verify, so status is polled until vendor schemes are verified. `connectorConfig.input` is a value slot: the per-contract payload reads the record through a CEL envelope (`envelopeId: { dialect: 'cel', source: 'record.envelope_id' }`). The answer proposes no `registerConnector` code and no plugin.",
7+
"expected_output": "A declarative instance inside the app, not a platform plugin and not a `connector-esign` family: `defineConnector` with `provider: 'openapi'`, whose `providerConfig.spec` is a packaged OpenAPI 3.x document converted offline from the Swagger 2.0 document and trimmed to the three operations (create envelope, get envelope, list status changes) (or `providerConfig.include` names those three operation keys, the `mcp` provider's allowlist meaning, where a non-array or unknown entry is fatal). Fields on `contract` (`envelope_id`, `signature_status`). Flows dispatch `connector_action`; the callback is an `api` flow with a start-node `secretRef`. Two gaps are named plainly, each blocked on its platform card: the declarative `auth` union has no `oauth2`, so the integration is marked **blocked** on outbound OAuth (no short-lived token parked behind a `bearer` `credentialRef`); DocuSign Connect signs its own header, which the `api` door does not verify, so status is polled until vendor schemes are verified. `connectorConfig.input` is a value slot: the per-contract payload reads the record through a CEL envelope (`envelopeId: { dialect: 'cel', source: 'record.envelope_id' }`), judged against the action's `inputSchema` before dispatch. The answer proposes no `registerConnector` code and no plugin.",
88
"files": [],
99
"assertions": {
1010
"must_contain": ["defineConnector", "provider: 'openapi'", "credentialRef", "connector_action", "type: 'api'", "secretRef", "Swagger 2.0", "blocked"],

‎skills/objectstack-automation/references/integration-recipes.md‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ deployment and to the sender. Scaffolded apps list the three executors in
1616
- Actions come from the upstream (an OpenAPI `operationId`, an MCP tool name,
1717
the `rest` provider's single `request`) — authored on the entry, they are refused.
1818
- `connectorConfig.input` is a value-slot map like `subflow` `input`: a top-level
19-
CEL envelope is evaluated, any other value kept as written (`{…}`, `{{ }}` are
20-
literal text). Before dispatch the result is judged against the action's
21-
`inputSchema`: `required`, `type` (with OpenAPI `nullable`), `properties`,
22-
`items`; `null` on an optional parameter is absent. A breach fails the step
23-
`VALIDATION_ERROR` (`fault`-routable) naming each path, nothing sent. Text
24-
is never converted: cast a string-held id,
19+
CEL envelope is evaluated, any other value kept as written. `registerFlow` and
20+
`os validate` refuse a `{…}` token at `connectorConfig.input.<key>`: a value
21+
from the record is a CEL envelope. Before dispatch the result is judged
22+
against the action's `inputSchema`: `required`, `type` (with OpenAPI
23+
`nullable`), `properties`, `items`; `null` on an optional parameter is
24+
absent. A breach fails the step `VALIDATION_ERROR` (`fault`-routable) naming
25+
each path, nothing sent. Text is never converted: cast a string-held id,
2526
`path: { dialect: 'cel', source: '{"petId": int(record.vendor_id)}' }`.
2627
`os validate` does not judge the `inputSchema` fit yet.
2728
- The answer lands as `<nodeId>.<key>` (`rest` / `openapi`: `{ status, ok, body }`;
28-
`mcp`: `{ ok, content, structuredContent? }`), read from a later node's value
29-
slot: `{ dialect: 'cel', source: 'bal.body.available[0].amount' }`.
29+
`mcp`: `{ ok, content, structuredContent? }`), read from a later node's value slot.
3030
- `auth`, each variant with a `credentialRef`: `bearer`; `api-key` (`headerName`,
3131
default `X-API-Key`, or `paramName` for a query-string key); `basic` (`username`
3232
stays in metadata). A secret in a url path has no variant — use a
@@ -36,12 +36,12 @@ deployment and to the sender. Scaffolded apps list the three executors in
3636
## 1 · OpenAPI document, static key — Stripe balance, nightly
3737

3838
```ts
39-
// Trim the vendor's OpenAPI 3.x document to the operations the app calls and ship
40-
// it in the package, package-relative.
39+
// Trim the vendor's OpenAPI 3.x document to the operations the app calls; its path
40+
// is package-relative.
4141
export const StripeConnector = defineConnector({
4242
name: 'stripe', label: 'Stripe', type: 'api', provider: 'openapi',
4343
providerConfig: { spec: './src/connectors/stripe.trimmed.json' },
44-
auth: { type: 'bearer', credentialRef: 'STRIPE_SECRET_KEY' }, // admin sets STRIPE_SECRET_KEY
44+
auth: { type: 'bearer', credentialRef: 'STRIPE_SECRET_KEY' },
4545
});
4646
// crm_account gains `stripe_available` (currency) and `stripe_synced_at` (datetime).
4747
export const StripeBalanceSweep = defineFlow({
@@ -108,7 +108,7 @@ export const WarehouseApi = defineConnector({
108108
```ts
109109
export const CarrierCallback = defineFlow({
110110
name: 'carrier_callback', label: 'Carrier status callback', type: 'api',
111-
runAs: 'system',
111+
runAs: 'system', // no trigger user
112112
nodes: [
113113
{ id: 'start', type: 'start', label: 'POST …/hooks/carrier_callback/carrier',
114114
config: { hookId: 'carrier', secretRef: 'CARRIER_HOOK_SECRET' } },
@@ -153,5 +153,4 @@ Each `operationId` is a named action in the flow palette and to agents;
153153
lifecycle is not delivered in the open tier. Do not park a short-lived access
154154
token behind a `bearer` ref. Blocked on the platform's outbound-OAuth card.
155155
- **Signature-authenticated vendor** (Alipay, WeChat Pay, Aliyun — RSA2 / HMAC
156-
canonical-request signing): no auth kind signs requests today; same handling,
157-
blocked on the request-signing card.
156+
canonical-request signing): no auth kind signs requests today; blocked on the request-signing card.

0 commit comments

Comments
 (0)