@uipath/maestro-builder-sdk 6.100.0 → 6.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +3 -0
  2. package/dist/api-index.md +14 -14
  3. package/dist/api-members.md +16 -16
  4. package/dist/cli/commands/capabilities.d.ts +10 -0
  5. package/dist/cli/commands/capabilities.js +24 -0
  6. package/dist/cli/common.d.ts +17 -17
  7. package/dist/cli/common.js +114 -20
  8. package/dist/cli/index.js +2 -0
  9. package/dist/core/actions.d.ts +6 -0
  10. package/dist/core/actions.js +7 -0
  11. package/dist/core/binding-messages.d.ts +33 -1
  12. package/dist/core/binding-messages.js +51 -0
  13. package/dist/core/connector-option-keys.d.ts +4 -0
  14. package/dist/core/connector-option-keys.js +9 -0
  15. package/dist/core/event-subscription.d.ts +8 -0
  16. package/dist/core/event-subscription.js +2 -4
  17. package/dist/core/nodes/node-type.d.ts +25 -0
  18. package/dist/core/nodes/versioned.d.ts +3 -1
  19. package/dist/core/nodes/versioned.js +1 -0
  20. package/dist/core/option-keys.d.ts +62 -0
  21. package/dist/core/option-keys.js +66 -0
  22. package/dist/core/refusals.d.ts +3 -0
  23. package/dist/core/refusals.js +5 -0
  24. package/dist/flow-node-type.d.ts +31 -1
  25. package/dist/flow-option-keys.d.ts +22 -0
  26. package/dist/flow-option-keys.js +33 -0
  27. package/dist/flow-sdk.js +5 -9
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.js +3 -0
  30. package/dist/nodes/agent/flow/inline-agent.js +2 -4
  31. package/dist/nodes/agent/flow/node-type.js +12 -0
  32. package/dist/nodes/ai-patterns/flow/node-type.js +6 -0
  33. package/dist/nodes/connector/flow/event-trigger.js +4 -2
  34. package/dist/nodes/connector/flow/event-wait.js +4 -2
  35. package/dist/nodes/connector/flow/node-type.js +5 -4
  36. package/dist/nodes/connector/flow/raw-node.js +1 -1
  37. package/dist/nodes/conversation/flow/node-type.js +9 -0
  38. package/dist/nodes/data-fabric/flow/verbs.js +10 -0
  39. package/dist/nodes/delay/flow/node-type.js +4 -0
  40. package/dist/nodes/document/flow/ixp.js +4 -0
  41. package/dist/nodes/document/flow/node-type.js +6 -0
  42. package/dist/nodes/hitl/flow/node-type.js +4 -0
  43. package/dist/nodes/http/flow/check.js +55 -0
  44. package/dist/nodes/http/flow/node-type.js +7 -4
  45. package/dist/nodes/process/flow/node-type.js +10 -0
  46. package/dist/nodes/queue/flow/node-type.js +4 -0
  47. package/dist/nodes/script/flow/node-type.js +4 -0
  48. package/dist/nodes/transform/flow/node-type.js +4 -0
  49. package/dist/nodes/trigger/flow/node-type.js +6 -0
  50. package/dist/sdk-capabilities.d.ts +57 -0
  51. package/dist/sdk-capabilities.js +76 -0
  52. package/dist/serialize.js +73 -1
  53. package/package.json +9 -3
package/README.md CHANGED
@@ -214,6 +214,9 @@ result itself (`registry search`, `registry path`, `bpmn check --graph`) prints
214
214
  only as that object under `--json`, never a second copy on stderr. `package.json` lists the optional
215
215
  surface a caller may probe for in `cliCapabilities` (`json-result`; `fetch-definitions` when a
216
216
  connector definition no library carries is fetched through `uip`, so no library has to be pulled).
217
+ `flow-sdk capabilities` prints that list with the installed version (`--json` for one
218
+ object), and `flowSdk.minVersion` in a project's `package.json` makes the `flow`, `case`
219
+ and `bpmn` verbs refuse an older SDK (`website/reference/CLI-LOOP.md`).
217
220
 
218
221
  The stable argv grammar is family first: `flow|case|bpmn`, then the SDK verb and
219
222
  its documented options. The process exit contract is `0` for success, `1` for
package/dist/api-index.md CHANGED
@@ -49,7 +49,7 @@ could hand you spans for a version you do not have.
49
49
  | `ActionSchemaFile` | interface | `dist/nodes/hitl/flow/spec.d.ts:281-291` | Supporting types | A coded action app's `action-schema.json`. |
50
50
  | `ActionSchemaProperty` | interface | `dist/nodes/hitl/flow/spec.d.ts:255-273` | Supporting types | One property of an `action-schema.json` section. |
51
51
  | `ActionSchemaSection` | interface | `dist/nodes/hitl/flow/spec.d.ts:274-280` | Supporting types | One section (`inputs`, `outputs`, `inOuts`, `outcomes`) of an `action-schema.json`. |
52
- | `ActionSpec` | type | `dist/core/actions.d.ts:952-960` | Supporting types | One action step's spec: `{ kind }` plus that kind's body from FlowActionSpecs, for every kind there. |
52
+ | `ActionSpec` | type | `dist/core/actions.d.ts:958-966` | Supporting types | One action step's spec: `{ kind }` plus that kind's body from FlowActionSpecs, for every kind there. |
53
53
  | `agent` | function | `dist/nodes/process/flow/factories.d.ts:159-213` | Actions | Invoke an AGENT resource — either one published to Orchestrator or a sibling agent project registered in the same… |
54
54
  | `AgentFlavour` | type | `dist/nodes/process/flow/spec.d.ts:294-298` | Supporting types | Which KIND of agent project was published behind a `uipath.core.agent.<key>` resource. |
55
55
  | `AgentGuardrail` | type | `dist/core/actions.d.ts:410` | Supporting types | |
@@ -89,8 +89,8 @@ could hand you spans for a version you do not have.
89
89
  | `ClassificationClass` | interface | `dist/nodes/document/flow/spec.d.ts:47-55` | Supporting types | One document type in a ClassificationSchema. |
90
90
  | `ClassificationSchema` | interface | `dist/nodes/document/flow/spec.d.ts:40-46` | Supporting types | The taxonomy of a `documentClassify()` step: what the classifier chooses between. |
91
91
  | `ClientSideToolRef` | interface | `dist/core/actions.d.ts:509-538` | Supporting types | A CLIENT-side tool: the agent asks the CALLING application to run it and hand the answer back… |
92
- | `connector` | function | `dist/core/actions.d.ts:989-1012` | Actions | Declare an Integration Service connector action — the typed form, where a generated descriptor supplies the nodeType and… |
93
- | `connector` | function | `dist/core/actions.d.ts:1013-1029` | Actions | Stringly form, for a connector with no prepared module — `connector('uipath-salesforce-slack',… |
92
+ | `connector` | function | `dist/core/actions.d.ts:995-1018` | Actions | Declare an Integration Service connector action — the typed form, where a generated descriptor supplies the nodeType and… |
93
+ | `connector` | function | `dist/core/actions.d.ts:1019-1035` | Actions | Stringly form, for a connector with no prepared module — `connector('uipath-salesforce-slack',… |
94
94
  | `ConnectorDescriptor` | type | `dist/core/connectors.d.ts:102-110` | Generated descriptors | A generated, typed connector descriptor: ConnectorMeta branded with phantom input/output types. |
95
95
  | `ConnectorLookupValue` | type | `dist/core/connectors.d.ts:63-72` | Generated descriptors | ConnectorValue for a field that also accepts an unresolved lookup. |
96
96
  | `ConnectorMeta` | interface | `dist/core/connectors.d.ts:73-101` | Generated descriptors | Runtime metadata a generated descriptor carries. |
@@ -145,8 +145,8 @@ could hand you spans for a version you do not have.
145
145
  | `err` | function | `dist/core/expr.d.ts:153-246` | Expressions and types | Reference a FAILED step's error → `$vars.<step>.error[.<field>]`. |
146
146
  | `ErrorEnvelopeField` | type | `dist/core/expr.d.ts:142-152` | Supporting types | The fields a failure envelope carries. |
147
147
  | `EscalationRef` | interface | `dist/core/actions.d.ts:808-874` | Supporting types | One escalation an inline agent may raise — an Action Center app task a human completes (the `coded-action-app` variant,… |
148
- | `EventFilter` | type | `dist/core/actions.d.ts:1030-1081` | Supporting types | One filter condition on the event payload. |
149
- | `EventSubscription` | interface | `dist/core/actions.d.ts:1155-1196` | Option shapes | What a connector event subscribes to. |
148
+ | `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
149
+ | `EventSubscription` | interface | `dist/core/actions.d.ts:1161-1202` | Option shapes | What a connector event subscribes to. |
150
150
  | `Expr` | class | `dist/core/expr.d.ts:11-21` | Supporting types | A Flow expression. |
151
151
  | `FieldMapping` | interface | `dist/nodes/transform/flow/spec.d.ts:27-34` | Supporting types | 3 field(s) |
152
152
  | `FilterCondition` | type | `dist/nodes/transform/flow/spec.d.ts:10-11` | Supporting types | Comparison a filter rule applies to a field. |
@@ -155,7 +155,7 @@ could hand you spans for a version you do not have.
155
155
  | `flow` | function | `dist/flow-sdk.d.ts:1664-1679` | Flow construction | Start building a flow with the given id. |
156
156
  | `FlowAction` | class | `dist/core/node-classes.d.ts:171-177` | Supporting types | A node placed as a step — pass an instance to `.step(name, …)`. |
157
157
  | `FlowActionSpec` | type | `dist/flow-sdk.d.ts:61-62` | Supporting types | What `.step()` accepts here: the shared actions plus this SDK's subflow. |
158
- | `FlowActionSpecs` | interface | `dist/core/actions.d.ts:916-951` | Supporting types | Every action kind, keyed by kind, to the body of its spec — the arm's fields other than `kind`. |
158
+ | `FlowActionSpecs` | interface | `dist/core/actions.d.ts:916-957` | Supporting types | Every action kind, keyed by kind, to the body of its spec — the arm's fields other than `kind`. |
159
159
  | `FlowBuilder` | class | `dist/flow-sdk.d.ts:1280-1663` | Builders | 15 member(s) |
160
160
  | `FlowLayout` | interface | `dist/flow-sdk.d.ts:696-709` | Supporting types | Designer layout for a flow, keyed by AUTHOR-level ids: node entries by step name (plus the trigger id and `end`), edge… |
161
161
  | `FlowMetadata` | interface | `dist/nodes/script/flow/spec.d.ts:63-95` | Actions | The instance metadata, as a script function's second parameter sees it. |
@@ -291,7 +291,7 @@ could hand you spans for a version you do not have.
291
291
  | `triggerDescriptor` | function | `dist/core/connectors.d.ts:152-164` | Generated descriptors | Brand a trigger descriptor literal with its where/output types. |
292
292
  | `TriggerDescriptor` | type | `dist/core/connectors.d.ts:143-151` | Generated descriptors | A generated, typed connector-trigger descriptor: TriggerMeta branded with phantom `where`/output types. |
293
293
  | `TriggerMeta` | interface | `dist/core/connectors.d.ts:133-142` | Generated descriptors | Runtime metadata a generated trigger descriptor carries. |
294
- | `TriggerOptions` | interface | `dist/core/actions.d.ts:1107-1154` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
294
+ | `TriggerOptions` | interface | `dist/core/actions.d.ts:1113-1160` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
295
295
  | `TriggerSpec` | type | `dist/nodes/trigger/flow/spec.d.ts:72-91` | Supporting types | What starts the flow. |
296
296
  | `TypeDesc` | type | `dist/core/expr.d.ts:404` | Supporting types | |
297
297
  | `types` | const | `dist/core/expr.d.ts:388-403` | Expressions and types | Variable type descriptors (map to Flow variable `type` values). |
@@ -304,8 +304,8 @@ could hand you spans for a version you do not have.
304
304
  | `VoiceAgentInputs` | interface | `dist/nodes/agent/flow/spec.d.ts:145-183` | Option shapes | What `voiceAgent()` takes: the agent's instructions, the call it joins, how it sounds, and the resources it attaches… |
305
305
  | `VoiceSettings` | interface | `dist/nodes/agent/flow/spec.d.ts:122-144` | Supporting types | The audio settings a voice agent speaks with. |
306
306
  | `voiceTrigger` | function | `dist/nodes/trigger/flow/factories.d.ts:104-134` | Actions | Start the flow when a phone call comes IN (`core.trigger.voice`). |
307
- | `waitForEvent` | function | `dist/core/actions.d.ts:1206-1241` | Actions | Wait mid-flow until a connector event fires, then continue with its payload — the typed form, where a generated trigger… |
308
- | `waitForEvent` | function | `dist/core/actions.d.ts:1242-1249` | Actions | Stringly form, for an event with no prepared module. |
307
+ | `waitForEvent` | function | `dist/core/actions.d.ts:1212-1247` | Actions | Wait mid-flow until a connector event fires, then continue with its payload — the typed form, where a generated trigger… |
308
+ | `waitForEvent` | function | `dist/core/actions.d.ts:1248-1255` | Actions | Stringly form, for an event with no prepared module. |
309
309
  | `waitForMessage` | function | `dist/nodes/conversation/flow/factories.d.ts:27-43` | Actions | PAUSE until the person sends their next message (`uipath.conversational.wait-for-message`) — a catch event, like… |
310
310
  | `WaitForMessageInputs` | interface | `dist/nodes/conversation/flow/spec.d.ts:28-36` | Option shapes | 2 field(s) |
311
311
 
@@ -343,7 +343,7 @@ could hand you spans for a version you do not have.
343
343
  | `CaseBuilder` | class | `dist/case/case-sdk.d.ts:1868-2157` | Builders | 18 member(s) |
344
344
  | `CaseConnectorOpts` | interface | `dist/case/case-sdk.d.ts:524-547` | Option shapes | TaskBuilder.connector's options: the Flow `connector()` options, plus the fields a decompiled task carries. |
345
345
  | `CaseDocumentExtractionSpec` | interface | `dist/case/case-sdk.d.ts:620-665` | Supporting types | A document-extraction task's IXP deployment and inputs (`.documentExtraction()`). |
346
- | `CaseEventFilter` | type | `dist/core/actions.d.ts:1082-1106` | Supporting types | A Case event filter: an EventFilter, or a text test or equality whose value is computed at runtime from a Case… |
346
+ | `CaseEventFilter` | type | `dist/core/actions.d.ts:1088-1112` | Supporting types | A Case event filter: an EventFilter, or a text test or equality whose value is computed at runtime from a Case… |
347
347
  | `CaseEventSubscription` | type | `dist/case/case-sdk.d.ts:492-499` | Option shapes | A Case wait's connector subscription: an EventSubscription whose `filters` may compare against a case expression… |
348
348
  | `CaseHttpRequestSpec` | interface | `dist/case/case-sdk.d.ts:568-610` | Supporting types | An HTTP request task's request (`.httpRequest()`). |
349
349
  | `CaseLayout` | interface | `dist/case/case-sdk.d.ts:1149-1160` | Supporting types | Optional Case designer layout, keyed by author-level stage and trigger names. |
@@ -368,9 +368,9 @@ could hand you spans for a version you do not have.
368
368
  | `EscalationOpts` | interface | `dist/case/case-sdk.d.ts:194-206` | Option shapes | 4 field(s) |
369
369
  | `EscalationRecipient` | interface | `dist/case/case-sdk.d.ts:186-193` | Supporting types | Who an escalation notifies. |
370
370
  | `EscalationTrigger` | type | `dist/case/case-sdk.d.ts:184-185` | Supporting types | When an escalation fires: as the deadline approaches (`at-risk`) or once it passes (`sla-breached`). |
371
- | `EventFilter` | type | `dist/core/actions.d.ts:1030-1081` | Supporting types | One filter condition on the event payload. |
371
+ | `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
372
372
  | `EventFilterExpression` | interface | `dist/core/event-filters.d.ts:131-146` | Supporting types | A filter value computed at runtime: the field is compared against a Case expression, `=vars.<path>` or… |
373
- | `EventSubscription` | interface | `dist/core/actions.d.ts:1155-1196` | Option shapes | What a connector event subscribes to. |
373
+ | `EventSubscription` | interface | `dist/core/actions.d.ts:1161-1202` | Option shapes | What a connector event subscribes to. |
374
374
  | `eventTrigger` | function | `dist/case/case-sdk.d.ts:379-389` | Case authoring | An Integration Service **event** trigger — an external event (a new row, an email, a webhook) starts the case. |
375
375
  | `eventTrigger` | function | `dist/case/case-sdk.d.ts:390-396` | Case authoring | An Integration Service event trigger in placeholder or stringly-resolved form. |
376
376
  | `EventTriggerOpts` | interface | `dist/case/case-sdk.d.ts:326-366` | Option shapes | 5 field(s) |
@@ -413,7 +413,7 @@ could hand you spans for a version you do not have.
413
413
  | `toUser` | function | `dist/case/case-sdk.d.ts:217-232` | Case authoring | An escalation recipient that is a single user. |
414
414
  | `TriggerDescriptor` | type | `dist/core/connectors.d.ts:143-151` | Supporting types | A generated, typed connector-trigger descriptor: TriggerMeta branded with phantom `where`/output types. |
415
415
  | `TriggerMeta` | interface | `dist/core/connectors.d.ts:133-142` | Supporting types | Runtime metadata a generated trigger descriptor carries. |
416
- | `TriggerOptions` | interface | `dist/core/actions.d.ts:1107-1154` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
416
+ | `TriggerOptions` | interface | `dist/core/actions.d.ts:1113-1160` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
417
417
  | `TypeDesc` | type | `dist/core/expr.d.ts:404` | Supporting types | |
418
418
  | `UnresolvedReferenceTaskKind` | type | `dist/case/case-sdk.d.ts:461-470` | Supporting types | Task kinds that the Case schema permits as unresolved skeletons: the published-resource kinds, `action` (a human task… |
419
419
  | `WaitConnectorPlaceholderSpec` | interface | `dist/case/case-sdk.d.ts:471-486` | Supporting types | A `wait-for-connector` subscription: suspend on an Integration Service event. |
@@ -474,7 +474,7 @@ could hand you spans for a version you do not have.
474
474
  | `errorSchema` | const | `dist/bpmn/bpmn-sdk.d.ts:3924-3965` | BPMN authoring | The `Error` variable's shape — the platform's own error envelope. |
475
475
  | `errorSchemaWithResponse` | const | `dist/bpmn/bpmn-sdk.d.ts:3966-3998` | BPMN authoring | The same envelope plus `response` — what a node whose failure carries a payload writes, and what the same source calls… |
476
476
  | `EventDef` | type | `dist/bpmn/bpmn-sdk.d.ts:56-74` | Supporting types | The resolved event definition attached to an event node. |
477
- | `EventFilter` | type | `dist/core/actions.d.ts:1030-1081` | Supporting types | One filter condition on the event payload. |
477
+ | `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
478
478
  | `EventKind` | type | `dist/bpmn/bpmn-sdk.d.ts:77-78` | Supporting types | The four non-boundary event element kinds a BpmnNode can be. |
479
479
  | `EventSubProcessOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:2092-2156` | Option shapes | Options for ScopeBuilder.eventSubProcess. |
480
480
  | `ExtensionPayload` | interface | `dist/bpmn/bpmn-sdk.d.ts:627-719` | Supporting types | An extension payload carried by an element the payload does not describe. |
@@ -172,19 +172,19 @@ not find it either.
172
172
  | `connection` | property | `ConnectorOpts` | `dist/core/actions.d.ts:19-23` |
173
173
  | `connection` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:677-684` |
174
174
  | `connection` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1269-1275` |
175
- | `connection` | property | `EventSubscription` | `dist/core/actions.d.ts:1188-1192` |
175
+ | `connection` | property | `EventSubscription` | `dist/core/actions.d.ts:1194-1198` |
176
176
  | `connection` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:715-716` |
177
177
  | `connection` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1746-1747` |
178
178
  | `connection` | property | `HttpOpts` | `dist/bpmn/bpmn-sdk.d.ts:1332-1360` |
179
179
  | `connection` | property | `HttpRequestConnector` | `dist/case/case-sdk.d.ts:615-616` |
180
- | `connection` | property | `TriggerOptions` | `dist/core/actions.d.ts:1145-1149` |
180
+ | `connection` | property | `TriggerOptions` | `dist/core/actions.d.ts:1151-1155` |
181
181
  | `connections` | property | `HitlRecipient` | `dist/nodes/hitl/flow/spec.d.ts:70-74` |
182
182
  | `connector` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1001` |
183
183
  | `connector` | property | `CaseHttpRequestSpec` | `dist/case/case-sdk.d.ts:605-609` |
184
184
  | `connector` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:662-663` |
185
- | `connector` | property | `EventSubscription` | `dist/core/actions.d.ts:1157-1158` |
185
+ | `connector` | property | `EventSubscription` | `dist/core/actions.d.ts:1163-1164` |
186
186
  | `connector` | property | `ExternalTaskSpecData` | `dist/case/case-sdk.d.ts:743-744` |
187
- | `connector` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:928-946` |
187
+ | `connector` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:928-952` |
188
188
  | `connector` | property | `RuleOpts` | `dist/case/case-sdk.d.ts:65-71` |
189
189
  | `connector` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2620-2640` |
190
190
  | `connector` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2641-2653` |
@@ -377,7 +377,7 @@ not find it either.
377
377
  | `escalation` | property | `RuleOpts` | `dist/case/case-sdk.d.ts:78-84` |
378
378
  | `escalations` | property | `BuiltSla` | `dist/case/case-sdk.d.ts:278` |
379
379
  | `escalations` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:268-269` |
380
- | `event` | property | `EventSubscription` | `dist/core/actions.d.ts:1159-1160` |
380
+ | `event` | property | `EventSubscription` | `dist/core/actions.d.ts:1165-1166` |
381
381
  | `event` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:728-733` |
382
382
  | `event` | property | `ExternalTaskSpecData` | `dist/case/case-sdk.d.ts:741-742` |
383
383
  | `event` | property | `TriggerMeta` | `dist/core/connectors.d.ts:137-138` |
@@ -436,8 +436,8 @@ not find it either.
436
436
  | `filter` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1682-1697` |
437
437
  | `filters` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1698-1713` |
438
438
  | `filters` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:85-86` |
439
- | `filters` | property | `EventSubscription` | `dist/core/actions.d.ts:1186-1187` |
440
- | `filters` | property | `TriggerOptions` | `dist/core/actions.d.ts:1143-1144` |
439
+ | `filters` | property | `EventSubscription` | `dist/core/actions.d.ts:1192-1193` |
440
+ | `filters` | property | `TriggerOptions` | `dist/core/actions.d.ts:1149-1150` |
441
441
  | `flavour` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:381-395` |
442
442
  | `flowIds` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3407-3450` |
443
443
  | `flowMode` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2347-2386` |
@@ -452,7 +452,7 @@ not find it either.
452
452
  | `folder` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:685-690` |
453
453
  | `folder` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1276-1288` |
454
454
  | `folder` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:26-27` |
455
- | `folder` | property | `EventSubscription` | `dist/core/actions.d.ts:1193-1194` |
455
+ | `folder` | property | `EventSubscription` | `dist/core/actions.d.ts:1199-1200` |
456
456
  | `folder` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:717-718` |
457
457
  | `folder` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1748-1749` |
458
458
  | `folder` | property | `HttpOpts` | `dist/bpmn/bpmn-sdk.d.ts:1361-1362` |
@@ -460,7 +460,7 @@ not find it either.
460
460
  | `folder` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1424-1425` |
461
461
  | `folder` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1490-1491` |
462
462
  | `folder` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:15-16` |
463
- | `folder` | property | `TriggerOptions` | `dist/core/actions.d.ts:1150-1151` |
463
+ | `folder` | property | `TriggerOptions` | `dist/core/actions.d.ts:1156-1157` |
464
464
  | `folderKey` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:583-584` |
465
465
  | `folderKey` | property | `CaseDocumentExtractionSpec` | `dist/case/case-sdk.d.ts:639-644` |
466
466
  | `folderKey` | property | `ContextIndexRef` | `dist/core/actions.d.ts:894-895` |
@@ -849,9 +849,9 @@ not find it either.
849
849
  | `object` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1672-1681` |
850
850
  | `object` | property | `ConnectorOpts` | `dist/core/actions.d.ts:26-58` |
851
851
  | `object` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:668-669` |
852
- | `object` | property | `EventSubscription` | `dist/core/actions.d.ts:1180-1185` |
852
+ | `object` | property | `EventSubscription` | `dist/core/actions.d.ts:1186-1191` |
853
853
  | `object` | property | `EventTriggerOpts` | `dist/case/case-sdk.d.ts:336-349` |
854
- | `object` | property | `TriggerOptions` | `dist/core/actions.d.ts:1132-1142` |
854
+ | `object` | property | `TriggerOptions` | `dist/core/actions.d.ts:1138-1148` |
855
855
  | `objectName` | property | `ConnectorMeta` | `dist/core/connectors.d.ts:79-88` |
856
856
  | `objectName` | property | `LookupSpec` | `dist/core/lookups.d.ts:23-24` |
857
857
  | `objectName` | property | `SelectNextStageSpec` | `dist/case/case-sdk.d.ts:405-406` |
@@ -1353,12 +1353,12 @@ not find it either.
1353
1353
  | `version` | property | `ConnectorMeta` | `dist/core/connectors.d.ts:76` |
1354
1354
  | `version` | property | `ConnectorOpts` | `dist/core/actions.d.ts:17-18` |
1355
1355
  | `version` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:666-667` |
1356
- | `version` | property | `EventSubscription` | `dist/core/actions.d.ts:1195` |
1356
+ | `version` | property | `EventSubscription` | `dist/core/actions.d.ts:1201` |
1357
1357
  | `version` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1750-1751` |
1358
1358
  | `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1460-1473` |
1359
1359
  | `version` | property | `NodeOptions` | `dist/flow-sdk.d.ts:241-248` |
1360
1360
  | `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:139` |
1361
- | `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:1152-1153` |
1361
+ | `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:1158-1159` |
1362
1362
  | `versions` | method | `NodeCatalog` | `dist/core/node-catalog.d.ts:15-16` |
1363
1363
  | `versionTag` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:167-168` |
1364
1364
  | `versionTag` | property | `IxpToolRef` | `dist/core/actions.d.ts:796-797` |
@@ -1367,7 +1367,7 @@ not find it either.
1367
1367
  | `wait` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:52-62` |
1368
1368
  | `wait` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1494-1498` |
1369
1369
  | `waitConnector` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1013-1014` |
1370
- | `waitEvent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:947-950` |
1370
+ | `waitEvent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:953-956` |
1371
1371
  | `waitForConnector` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1496-1505` |
1372
1372
  | `waitForConnector` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1506-1513` |
1373
1373
  | `waitForEvent` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3084-3125` |
@@ -1380,8 +1380,8 @@ not find it either.
1380
1380
  | `when` | property | `FormFieldCondition` | `dist/core/actions.d.ts:136-137` |
1381
1381
  | `when` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:261-267` |
1382
1382
  | `when` | property | `SwitchArm` | `dist/flow-sdk.d.ts:206-211` |
1383
- | `where` | property | `EventSubscription` | `dist/core/actions.d.ts:1161-1179` |
1384
- | `where` | property | `TriggerOptions` | `dist/core/actions.d.ts:1114-1131` |
1383
+ | `where` | property | `EventSubscription` | `dist/core/actions.d.ts:1167-1185` |
1384
+ | `where` | property | `TriggerOptions` | `dist/core/actions.d.ts:1120-1137` |
1385
1385
  | `width` | property | `CaseNodeLayout` | `dist/case/case-sdk.d.ts:1142-1143` |
1386
1386
  | `width` | property | `StickyNote` | `dist/flow-sdk.d.ts:691-692` |
1387
1387
  | `x` | property | `StickyNote` | `dist/flow-sdk.d.ts:687-688` |
@@ -0,0 +1,10 @@
1
+ import type { Command } from 'commander';
2
+ /**
3
+ * `flow-sdk capabilities` (#1991): what this installed copy supports, so a
4
+ * caller asks instead of guessing the release from what the package ships.
5
+ *
6
+ * Plain output is the name and version on the first line, then one capability
7
+ * per line, so `flow-sdk capabilities | grep -qx flow-check-baseline` works.
8
+ * With `--json`: `{"ok":true,"name":…,"version":…,"gitref":…,"capabilities":[…]}`.
9
+ */
10
+ export declare function registerCapabilitiesCommand(program: Command): void;
@@ -0,0 +1,24 @@
1
+ import { jsonResultRequested, recordJsonFields } from '../common.js';
2
+ /**
3
+ * `flow-sdk capabilities` (#1991): what this installed copy supports, so a
4
+ * caller asks instead of guessing the release from what the package ships.
5
+ *
6
+ * Plain output is the name and version on the first line, then one capability
7
+ * per line, so `flow-sdk capabilities | grep -qx flow-check-baseline` works.
8
+ * With `--json`: `{"ok":true,"name":…,"version":…,"gitref":…,"capabilities":[…]}`.
9
+ */
10
+ export function registerCapabilitiesCommand(program) {
11
+ program.command('capabilities')
12
+ .description('Print this SDK\'s name, version, gitref and the stable names of the features it supports.')
13
+ .action(async () => {
14
+ const { sdkCapabilities } = await import('../../sdk-capabilities.js');
15
+ const caps = sdkCapabilities();
16
+ if (jsonResultRequested()) {
17
+ recordJsonFields({ ...caps });
18
+ return;
19
+ }
20
+ console.log(`${caps.name} ${caps.version}${caps.gitref === null ? '' : ` (gitref ${caps.gitref})`}`);
21
+ for (const capability of caps.capabilities)
22
+ console.log(capability);
23
+ });
24
+ }
@@ -11,6 +11,8 @@ export declare function invoke(label: string, load: () => Promise<{
11
11
  export declare function refuse(message: string, exitCode?: number): void;
12
12
  /** Record why the verb failed before any tool ran, for the `--json` object. */
13
13
  export declare function recordJsonError(message: string): void;
14
+ /** Add a verb's own fields to the `--json` object. */
15
+ export declare function recordJsonFields(fields: Record<string, unknown>): void;
14
16
  /** Turn `--json` on for this run (the umbrella's `preAction` hook). */
15
17
  export declare function requestJsonResult(): void;
16
18
  export declare function jsonResultRequested(): boolean;
@@ -22,26 +24,24 @@ export declare function jsonResultRequested(): boolean;
22
24
  */
23
25
  export declare function emitJsonResult(): void;
24
26
  export declare function addValue(argv: string[], flag: string, value: unknown): void;
27
+ /** Is emit-only mode on for the PROJECT containing `cwd`? See {@link nearestSetting}. */
28
+ export declare function emitOnlyEnabled(cwd?: string, env?: NodeJS.ProcessEnv): boolean;
25
29
  /**
26
- * Is emit-only mode on for the PROJECT containing `cwd`?
27
- *
28
- * Emit-only is a property of the project, not of the directory you happen to be
29
- * standing in, so this walks up for the nearest `package.json` that actually
30
- * declares `flowSdk.emitOnly` — the way Node tooling resolves project config.
30
+ * Refuse a `flow`, `case` or `bpmn` verb (exit 2) when its project declares
31
+ * `flowSdk.minVersion` and this installed SDK is older (#1991). The project is
32
+ * looked up from the working directory and from each input path
33
+ * ({@link floorAnchors}); a floor any of them finds must be met. Returns whether
34
+ * it refused.
31
35
  *
32
- * Anchoring it to `process.cwd()` alone was #392. Compiling the same project from
33
- * a subdirectory found no `package.json`, silently re-armed the checker, and —
34
- * because check GATES EMISSION — turned a working build into
35
- * `compile: 1 error(s); not emitting.` The same anchoring let `flow check` slip
36
- * past its own emit-only refusal simply by being run one directory down.
37
- *
38
- * Nearest DECLARATION wins, not nearest package.json: a nested `package.json`
39
- * that says nothing about `flowSdk` must not lift an ancestor's emit-only, since
40
- * scaffolders (`uip solution init`) drop exactly such a file into a subdirectory
41
- * of an emit-only project. A nested package that explicitly sets
42
- * `emitOnly: false` still opts out — silence and denial are different answers.
36
+ * The floor lets a project, or a skill that writes its package.json, state the
37
+ * one release it was written for, instead of probing the SDK for each feature.
38
+ * The nearest declaration wins, as for `emitOnly`. A value that is not a release
39
+ * version (`"^6.1"`, `6`) is refused too: a typo must not switch the floor off.
40
+ * A build of a checkout (`0.0.0-local`, `9999.0.0-local`) meets every floor.
41
+ * Registry verbs and `capabilities` are not gated: they are how a caller finds
42
+ * out what it has.
43
43
  */
44
- export declare function emitOnlyEnabled(cwd?: string, env?: NodeJS.ProcessEnv): boolean;
44
+ export declare function refuseBelowMinVersion(label: string, argv?: readonly string[], cwd?: string): Promise<boolean>;
45
45
  export type CheckMode = 'source' | 'compiled';
46
46
  export declare function inferCheckMode(family: 'flow' | 'case' | 'bpmn', input: string, source: boolean, compiled: boolean): CheckMode;
47
47
  /**
@@ -1,7 +1,10 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
- import { dirname, join, resolve } from 'node:path';
2
+ import { basename, dirname, join, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
3
4
  import { Option } from 'commander';
4
5
  export async function invoke(label, load, argv) {
6
+ if (await refuseBelowMinVersion(label, argv))
7
+ return;
5
8
  // In `--json` mode stdout carries exactly one JSON object, printed by
6
9
  // `emitJsonResult` once the verb is done. The tool's own human lines go to
7
10
  // stderr meanwhile, so they are still seen but never mixed into it.
@@ -48,6 +51,10 @@ export function refuse(message, exitCode = 2) {
48
51
  export function recordJsonError(message) {
49
52
  resultSlot().fields.error ??= message.replace(/^error: /, '');
50
53
  }
54
+ /** Add a verb's own fields to the `--json` object. */
55
+ export function recordJsonFields(fields) {
56
+ Object.assign(resultSlot().fields, fields);
57
+ }
51
58
  /** Turn `--json` on for this run (the umbrella's `preAction` hook). */
52
59
  export function requestJsonResult() {
53
60
  resultSlot().json = true;
@@ -80,29 +87,30 @@ export function addValue(argv, flag, value) {
80
87
  argv.push(flag, value);
81
88
  }
82
89
  /**
83
- * `flowSdk.emitOnly` as declared by ONE package.json, or `undefined` when that
84
- * file says nothing about it — absent, unreadable, malformed, or non-boolean.
85
- * "Says nothing" is deliberately distinct from "says false": only the former
86
- * lets the search continue to the parent directory.
90
+ * The value `flowSdk.<key>` has in ONE package.json, or `undefined` when that
91
+ * file says nothing about it — absent, unreadable, malformed, or rejected by
92
+ * `accept`. "Says nothing" is deliberately distinct from "says false": only the
93
+ * former lets the search continue to the parent directory.
87
94
  */
88
- function declaredEmitOnly(packagePath) {
95
+ function declaredSetting(packagePath, key, accept) {
89
96
  if (!existsSync(packagePath))
90
97
  return undefined;
91
98
  try {
92
99
  const pkg = JSON.parse(readFileSync(packagePath, 'utf8'));
93
- const declared = pkg.flowSdk?.emitOnly;
94
- return typeof declared === 'boolean' ? declared : undefined;
100
+ const declared = pkg.flowSdk?.[key];
101
+ return declared === undefined ? undefined : accept(declared);
95
102
  }
96
103
  catch {
97
104
  return undefined;
98
105
  }
99
106
  }
100
107
  /**
101
- * Is emit-only mode on for the PROJECT containing `cwd`?
108
+ * The nearest `flowSdk.<key>` declaration at or above `cwd`, with the
109
+ * package.json that made it; `undefined` when no ancestor declares one.
102
110
  *
103
- * Emit-only is a property of the project, not of the directory you happen to be
104
- * standing in, so this walks up for the nearest `package.json` that actually
105
- * declares `flowSdk.emitOnly` — the way Node tooling resolves project config.
111
+ * A setting under `flowSdk` is a property of the project, not of the directory
112
+ * you happen to be standing in, so this walks up for the nearest `package.json`
113
+ * that actually declares it — the way Node tooling resolves project config.
106
114
  *
107
115
  * Anchoring it to `process.cwd()` alone was #392. Compiling the same project from
108
116
  * a subdirectory found no `package.json`, silently re-armed the checker, and —
@@ -111,23 +119,109 @@ function declaredEmitOnly(packagePath) {
111
119
  * past its own emit-only refusal simply by being run one directory down.
112
120
  *
113
121
  * Nearest DECLARATION wins, not nearest package.json: a nested `package.json`
114
- * that says nothing about `flowSdk` must not lift an ancestor's emit-only, since
122
+ * that says nothing about `flowSdk` must not lift an ancestor's setting, since
115
123
  * scaffolders (`uip solution init`) drop exactly such a file into a subdirectory
116
- * of an emit-only project. A nested package that explicitly sets
117
- * `emitOnly: false` still opts out — silence and denial are different answers.
124
+ * of a project. A nested package that explicitly sets `emitOnly: false` still
125
+ * opts out — silence and denial are different answers.
118
126
  */
127
+ function nearestSetting(cwd, key, accept) {
128
+ for (let dir = resolve(cwd);;) {
129
+ const path = join(dir, 'package.json');
130
+ const value = declaredSetting(path, key, accept);
131
+ if (value !== undefined)
132
+ return { value, path };
133
+ const parent = dirname(dir);
134
+ if (parent === dir)
135
+ return undefined; // filesystem root, nothing declared it
136
+ dir = parent;
137
+ }
138
+ }
139
+ /** Is emit-only mode on for the PROJECT containing `cwd`? See {@link nearestSetting}. */
119
140
  export function emitOnlyEnabled(cwd = process.cwd(), env = process.env) {
120
141
  if (env.FLOW_SDK_EMIT_ONLY === '1')
121
142
  return true;
122
- for (let dir = resolve(cwd);;) {
123
- const declared = declaredEmitOnly(join(dir, 'package.json'));
124
- if (declared !== undefined)
125
- return declared;
143
+ return nearestSetting(cwd, 'emitOnly', (value) => (typeof value === 'boolean' ? value : undefined))?.value ?? false;
144
+ }
145
+ /** The families whose verbs read or write an artifact, and so honor the project floor. */
146
+ const FLOOR_FAMILIES = new Set(['flow', 'case', 'bpmn']);
147
+ /**
148
+ * The directories a verb's floor is looked up from: the working directory, and
149
+ * the directory of each input path, the leading positional arguments before the
150
+ * first option (`[source]`, `[input]`, `[original, edited]`). A verb run from
151
+ * outside its project (`flow check proj/sub/X.flow.ts`) is still in that project.
152
+ */
153
+ function floorAnchors(cwd, argv) {
154
+ const anchors = [resolve(cwd)];
155
+ for (const arg of argv) {
156
+ if (arg.startsWith('-'))
157
+ break;
158
+ const dir = dirname(resolve(cwd, arg));
159
+ if (!anchors.includes(dir))
160
+ anchors.push(dir);
161
+ }
162
+ return anchors;
163
+ }
164
+ /**
165
+ * The npm command that upgrades THIS copy of the SDK. A copy under a project's
166
+ * `node_modules` is used before a global one, so upgrading the global copy would
167
+ * leave the refusal in place; name `--save-dev` and the project then. `@latest`
168
+ * meets any published floor and needs no shell quoting (`>=` is a redirect in
169
+ * `cmd.exe`, quoted or not).
170
+ */
171
+ function upgradeCommand(name, packageRoot) {
172
+ for (let dir = packageRoot;;) {
126
173
  const parent = dirname(dir);
127
174
  if (parent === dir)
128
- return false; // filesystem root, nothing declared it
175
+ break;
176
+ if (basename(dir) === 'node_modules') {
177
+ if (existsSync(join(parent, 'package.json')))
178
+ return `\`npm install --save-dev ${name}@latest\` in ${parent}`;
179
+ break; // <prefix>/lib/node_modules, %APPDATA%\npm\node_modules: the global copy
180
+ }
129
181
  dir = parent;
130
182
  }
183
+ return `\`npm install -g ${name}@latest\``;
184
+ }
185
+ /** This package's root, from `dist/cli/common.js`. */
186
+ const PACKAGE_ROOT = resolve(fileURLToPath(new URL('../../', import.meta.url)));
187
+ /**
188
+ * Refuse a `flow`, `case` or `bpmn` verb (exit 2) when its project declares
189
+ * `flowSdk.minVersion` and this installed SDK is older (#1991). The project is
190
+ * looked up from the working directory and from each input path
191
+ * ({@link floorAnchors}); a floor any of them finds must be met. Returns whether
192
+ * it refused.
193
+ *
194
+ * The floor lets a project, or a skill that writes its package.json, state the
195
+ * one release it was written for, instead of probing the SDK for each feature.
196
+ * The nearest declaration wins, as for `emitOnly`. A value that is not a release
197
+ * version (`"^6.1"`, `6`) is refused too: a typo must not switch the floor off.
198
+ * A build of a checkout (`0.0.0-local`, `9999.0.0-local`) meets every floor.
199
+ * Registry verbs and `capabilities` are not gated: they are how a caller finds
200
+ * out what it has.
201
+ */
202
+ export async function refuseBelowMinVersion(label, argv = [], cwd = process.cwd()) {
203
+ if (!FLOOR_FAMILIES.has(label.split(' ')[0]))
204
+ return false;
205
+ const found = floorAnchors(cwd, argv)
206
+ .map((dir) => nearestSetting(dir, 'minVersion', (value) => value))
207
+ .filter((declared) => declared !== undefined);
208
+ if (found.length === 0)
209
+ return false;
210
+ const { isSdkVersionFloor, sdkCapabilities, sdkVersionSatisfies } = await import('../sdk-capabilities.js');
211
+ const { name, version } = sdkCapabilities();
212
+ for (const declared of found) {
213
+ const floor = declared.value;
214
+ if (typeof floor !== 'string' || !isSdkVersionFloor(floor)) {
215
+ refuse(`flow-sdk ${label}: flowSdk.minVersion in ${declared.path} is ${JSON.stringify(floor)}; write a plain release version, X.Y.Z`);
216
+ return true;
217
+ }
218
+ if (sdkVersionSatisfies(version, floor))
219
+ continue;
220
+ refuse(`flow-sdk ${label}: this project needs ${name} >= ${floor} (flowSdk.minVersion in ${declared.path}); found ${version} at ${PACKAGE_ROOT}. ` +
221
+ `Upgrade that copy: ${upgradeCommand(name, PACKAGE_ROOT)}.`);
222
+ return true;
223
+ }
224
+ return false;
131
225
  }
132
226
  export function inferCheckMode(family, input, source, compiled) {
133
227
  if (source && compiled)
package/dist/cli/index.js CHANGED
@@ -3,6 +3,7 @@ import { readFileSync } from 'node:fs';
3
3
  import { Command, CommanderError } from 'commander';
4
4
  import { emitJsonResult, recordJsonError, requestJsonResult } from './common.js';
5
5
  import { registerBpmnCommands } from './commands/bpmn.js';
6
+ import { registerCapabilitiesCommand } from './commands/capabilities.js';
6
7
  import { registerCaseCommands } from './commands/case.js';
7
8
  import { registerFlowCommands } from './commands/flow.js';
8
9
  import { registerRegistryCommands } from './commands/registry.js';
@@ -16,6 +17,7 @@ registerFlowCommands(program);
16
17
  registerCaseCommands(program);
17
18
  registerBpmnCommands(program);
18
19
  registerRegistryCommands(program);
20
+ registerCapabilitiesCommand(program);
19
21
  // `--json` on every verb (#809): one JSON object on stdout, human lines on
20
22
  // stderr. Added here, once, so a new verb cannot ship without it.
21
23
  const addJson = (command) => {
@@ -943,6 +943,12 @@ export interface FlowActionSpecs {
943
943
  carried?: CarriedConnectorOperation;
944
944
  /** The operation's inputs, by field. */
945
945
  inputs: Record<string, unknown>;
946
+ /**
947
+ * The author's options object, kept only when it holds a key
948
+ * {@link ConnectorOpts} does not name, so the serializer can refuse that
949
+ * key (FLOW_UNKNOWN_OPTION) instead of dropping it (builder-sdk#1990).
950
+ */
951
+ options?: Readonly<Record<string, unknown>>;
946
952
  };
947
953
  /** The spec {@link waitForEvent} builds. */
948
954
  waitEvent: {
@@ -1,5 +1,6 @@
1
1
  import { splitConnectorNodeType, isTriggerDescriptor, } from './connectors.js';
2
2
  import { FlowAction, FlowTrigger } from './node-classes.js';
3
+ import { CONNECTOR_OPTION_KEYS } from './connector-option-keys.js';
3
4
  // ── Built-in spec adapters ──────────────────────────────────────────────────
4
5
  // Every factory result IS a FlowAction/FlowTrigger instance (design §4.4 pass
5
6
  // 1), so `instanceof` can tell an SDK-owned construct from a raw literal. The
@@ -49,6 +50,10 @@ export function builtinActionSpec(spec) {
49
50
  export function builtinTriggerSpec(spec) {
50
51
  return new BuiltinTrigger(spec);
51
52
  }
53
+ /** The author's options, as the spec keeps them: only when one of their keys is unknown (see the spec's `options`). */
54
+ function unreadOptions(opts) {
55
+ return Object.keys(opts).some((k) => !CONNECTOR_OPTION_KEYS.includes(k)) ? { options: opts } : {};
56
+ }
52
57
  export function connector(a, b, c, d) {
53
58
  if (typeof a === 'string') {
54
59
  const opts = (d ?? {});
@@ -62,6 +67,7 @@ export function connector(a, b, c, d) {
62
67
  object: opts.object,
63
68
  ...(opts.carried !== undefined ? { carried: opts.carried } : {}),
64
69
  inputs: c ?? {},
70
+ ...unreadOptions(opts),
65
71
  });
66
72
  }
67
73
  // Descriptor form: (descriptor, inputs, opts) — derive key/action from the nodeType.
@@ -77,6 +83,7 @@ export function connector(a, b, c, d) {
77
83
  object: opts.object ?? a.objectName,
78
84
  ...(opts.carried !== undefined ? { carried: opts.carried } : {}),
79
85
  inputs: b ?? {},
86
+ ...unreadOptions(opts),
80
87
  });
81
88
  }
82
89
  /**
@@ -13,7 +13,9 @@ export type BindingRefusalCode = 'BINDING_SELF_NAME' | 'BINDING_UNDECLARED'
13
13
  /** Two steps on one connection disagree on which connector it belongs to (#866). */
14
14
  | 'CONNECTION_CONNECTOR_CONFLICT'
15
15
  /** A connector-bound node names no `connection` or no `folder` label (#890). */
16
- | 'BINDING_MISSING';
16
+ | 'BINDING_MISSING'
17
+ /** A node's `connection` and `folder` are one label, or resolve to one resource key (#1968). */
18
+ | 'BINDING_CONNECTION_IS_FOLDER';
17
19
  /**
18
20
  * What `serialize` throws for a label it refuses. It is an ordinary `Error` whose
19
21
  * message is the sentence `check` prints; the `code` lets `compile --no-check`
@@ -123,6 +125,36 @@ export declare function missingBindingLabels(labels: {
123
125
  } | undefined): ('connection' | 'folder')[];
124
126
  /** Why compile refuses a connector-bound node with no `connection` / `folder` label, and how to bind it. */
125
127
  export declare function bindingMissingMessage(where: string, missing: readonly ('connection' | 'folder')[], target?: PrepareTarget): string;
128
+ /**
129
+ * BINDING_CONNECTION_IS_FOLDER (#1968): a node whose connection and folder are
130
+ * the same value. The node then sends one id as both its `connectionId` and its
131
+ * `connectionFolderKey`, and no tenant has a connection whose id is its folder's
132
+ * key. `check`, `compile` and `flow validate` used to pass it; the run faulted
133
+ * at dispatch with `401 Invalid Organization or User secret`.
134
+ *
135
+ * Two routes in, both refused:
136
+ *
137
+ * - ONE LABEL for both (`connection: 'slack', folder: 'slack'`). bindings.json
138
+ * answers a label with one `resourceKey`, so the two halves cannot differ.
139
+ * `prepare` with such a source also writes one row for the label, the
140
+ * `FolderKey` row last, so the connection resolves to the folder key. Refused
141
+ * with or without a bindings.json: the labels alone decide it. Except when
142
+ * the label is itself a placeholder (an all-zero GUID or an `<angle>` value,
143
+ * as decompile writes for a node saved with a stub in both keys): that is
144
+ * offline authoring, and `CONNECTION_STUB` warns about it.
145
+ * - TWO LABELS, ONE KEY (`slack` and `shared` both carry the same GUID, say the
146
+ * connection's `Id` pasted into the folder row). Refused only when that key
147
+ * could be a real tenant id: two placeholder rows that share an all-zero GUID
148
+ * or an `<angle>` value are offline authoring, which `CONNECTION_STUB` already
149
+ * warns about.
150
+ *
151
+ * Call it with the labels the node names; `undefined` when either is absent
152
+ * (that is `BINDING_MISSING`'s) or the pair is fine.
153
+ */
154
+ export declare function bindingPairRefusal(bindings: BindingsView | undefined, labels: {
155
+ connection?: unknown;
156
+ folder?: unknown;
157
+ }, where: string, target?: PrepareTarget): BindingRefusal | undefined;
126
158
  /**
127
159
  * The all-zero prefix authors reach for when they need "a GUID" and have none:
128
160
  * `00000000-0000-0000-0000-000000000001`. No tenant issues these. The same