Skip to content

Commit 7ba22e9

Browse files
committed
chore(spec): regenerate api-surface and export-origins; changesets for unboundCause
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PU9ijL7gdKme3dFxWKcBE6
1 parent 2267a9d commit 7ba22e9

4 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@objectstack/service-automation': minor
3+
---
4+
5+
feat(automation): `getFlowRuntimeStates()` stamps `unboundCause` beside `reason`
6+
7+
Clause-②: yes (widening)
8+
9+
Each branch that decides why an enabled, triggered flow is not armed now answers its closed `FlowUnboundCause` together with its sentence: `deployment_policy`, `disabled_subflow`, `missing_trigger` or `binding_failure`. `GET /automation/_status` passes the rows through unchanged, so the field reaches the console with no route change. Bound, disabled and trigger-less rows carry neither `reason` nor `unboundCause`. The sentences and `getTriggerBindingAudit()` are unchanged.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `FlowRuntimeState` gains `unboundCause`, a closed classifier beside `reason`
6+
7+
Clause-②: yes (widening)
8+
9+
`FlowRuntimeState.reason` is a sentence a consumer renders and must not parse, so until now a console could not tell a flow left unarmed by deployment policy from one whose binding is broken: both arrive as `enabled: true, bound: false` with a `reason`. The row now also carries an optional `unboundCause`, present on exactly the rows that carry `reason` and absent on every other row.
10+
11+
Its values are published as `FLOW_UNBOUND_CAUSES` (`@objectstack/spec/contracts`), with the derived type `FlowUnboundCause`:
12+
13+
- `deployment_policy`: package-authored scheduled work is switched off on this deployment. An operator remedy, not a defect.
14+
- `disabled_subflow`: the flow calls a packaged subflow that is disabled (ADR-0126 §7.3). Enable the subflow and the caller arms.
15+
- `missing_trigger`: no trigger of the declared type is registered. Depend on the trigger package (`requires: ['triggers']`).
16+
- `binding_failure`: the trigger is registered but binding the flow to it failed. The earlier boot warnings name the error.
17+
18+
Additive: existing producers and consumers keep working unchanged, and `reason` keeps its text.

‎packages/spec/api-surface/contracts.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@
100100
"ExecuteUpgradeInput (interface)",
101101
"ExplainAccessRequest (interface)",
102102
"FILE_ATTACHMENT_SERVICE (const)",
103+
"FLOW_UNBOUND_CAUSES (const)",
103104
"FinishReason (type)",
104105
"FlowRuntimeState (interface)",
106+
"FlowUnboundCause (type)",
105107
"GenerateDraftOpts (interface)",
106108
"GenerateObjectOptions (interface)",
107109
"GrantShareInput (interface)",

‎packages/spec/export-origins/contracts.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@
100100
"ExecuteUpgradeInput": "src/contracts/package-service.ts#ExecuteUpgradeInput (interface)",
101101
"ExplainAccessRequest": "src/contracts/security-service.ts#ExplainAccessRequest (interface)",
102102
"FILE_ATTACHMENT_SERVICE": "src/contracts/storage-service.ts#FILE_ATTACHMENT_SERVICE (const)",
103+
"FLOW_UNBOUND_CAUSES": "src/contracts/automation-service.ts#FLOW_UNBOUND_CAUSES (const)",
103104
"FinishReason": "node_modules/ai/dist/index.d.ts#FinishReason (type)",
104105
"FlowRuntimeState": "src/contracts/automation-service.ts#FlowRuntimeState (interface)",
106+
"FlowUnboundCause": "src/contracts/automation-service.ts#FlowUnboundCause (type)",
105107
"GenerateDraftOpts": "src/contracts/external-datasource-service.ts#GenerateDraftOpts (interface)",
106108
"GenerateObjectOptions": "src/contracts/ai-service.ts#GenerateObjectOptions (interface)",
107109
"GrantShareInput": "src/contracts/sharing-service.ts#GrantShareInput (interface)",

0 commit comments

Comments
 (0)