You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e1fa8b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/28149-flow-clone-lands-in-package.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@
7
7
8
8
feat(runtime)!: the flow clone door is "new similar" — the copy lands switched off in a writable package, by default the source's paired `<base>.custom`, never package-less (#28149)
9
9
10
-
Clause-②: yes (narrowing) — `POST /api/v1/automation/:name/clone` accepts a new optional `package` member and answers two new members (`packageId`, the copy's package, beside `flow` and `notice`), and a request it accepted before is now refused: a clone of a flow no read-only package ships, sent with no `package`, is refused `400` where it was written package-less.
10
+
Clause-②: yes (narrowing) — `POST /api/v1/automation/:name/clone` accepts a new optional `package` member and answers a new `packageId` member (the copy's package, beside `flow` and `notice`), and a request it accepted before is now refused: a clone of a flow no read-only package ships, sent with no `package`, is refused `400` where it was written package-less.
11
11
Metadata-protocol: none
12
12
13
-
<!-- adr-0087: not-required (no-migration-prescription) No key of any metadata schema is added, removed, renamed or re-shaped and no stored metadata changes: the door's request body gains one optional member and its answer two, and a copy written before this change stays where it is. The remedy for the newly refused request is the request's own (name the writable package with `package`), so there is nothing for a migration to rewrite and no tombstone. -->
13
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any metadata schema is added, removed, renamed or re-shaped and no stored metadata changes: the door's request body gains one optional member and its answer one, and a copy written before this change stays where it is. The remedy for the newly refused request is the request's own (name the writable package with `package`), so there is nothing for a migration to rewrite and no tombstone. -->
14
14
15
15
**BREAKING** request narrowing at the flow clone door (`@objectstack/runtime`'s `/automation` domain), per ADR-0146 D3/D4.
@@ -99,6 +100,64 @@ const result = AutomationApiErrorCode.parse(data);
99
100
|**runId**|`string`| ✅ | Execution run ID |
100
101
101
102
103
+
---
104
+
105
+
## CloneFlowRequest
106
+
107
+
### Properties
108
+
109
+
| Property | Type | Required | Description |
110
+
| :--- | :--- | :--- | :--- |
111
+
|**name**|`string`| ✅ | The copy's machine name — mandatory, and a name no flow uses (ADR-0126 §7.1): the automation engine keys flows by bare name, so a taken name is refused 409 `RESOURCE_CONFLICT`. |
112
+
|**label**|`string`| ✅ | The copy's display name — mandatory, so the copy and its source are told apart in every list. |
113
+
|**package**|`string`| optional | Id of the package the copy lands in. Given, it must be an installed, writable package whose dependency closure holds the source's package: an unknown or read-only one is refused 422 `WRITABLE_PACKAGE_REQUIRED`, one that declares no dependency path to the source's package 409 `RESOURCE_CONFLICT`, and nothing is written. Omitted, the copy lands in the source's paired customization package `<base>.custom`, created on first use; a source no read-only package ships has no pair, and the request is refused 400 `VALIDATION_FAILED` located on this member. |
114
+
115
+
116
+
---
117
+
118
+
## CloneFlowResponse
119
+
120
+
### Properties
121
+
122
+
| Property | Type | Required | Description |
123
+
| :--- | :--- | :--- | :--- |
124
+
|**success**|`boolean`| ✅ | Operation success status |
|**code**|`Enum<'VALIDATION_ERROR' \| 'INVALID_FIELD' \| 'MISSING_REQUIRED_FIELD' \| …>`| ✅ | Error code (e.g. VALIDATION_ERROR; StandardErrorCode ∪ the ledger the serving side registers — ERROR_CODE_LEDGER for framework packages) |
134
+
|**declaredCode**|`string`| optional | The producer-declared code, verbatim, when it is not a member of the closed `code` vocabulary — the open, author-authored channel (app-specific spellings; ADR-0112) |
|**userMessage**|`string`| optional | Producer-marked user-facing refusal text, verbatim. Present exactly when the producer opted in at throw time; consumers render it to end users and keep their generic substitution for anything unmarked. Status-agnostic; never replaces `message`. |
137
+
|**refusal**|`true`| optional | Producer-declared: the 5xx this envelope carries is a deliberate refusal whose `message` is authored for the caller, so a boundary that reads the declaration keeps it verbatim (until the withhold arms read it, a declared refusal is still withheld). Absent (the default) on a declared fault, whose `message` is withheld from the body and logged for the operator; redundant on a 4xx. Presence is the declaration — `true` is the only value. |
|**requestId**|`string`| optional | Request ID for tracking |
142
+
143
+
### Nested Shape: `CloneFlowResponse.meta`
144
+
145
+
| Property | Type | Required | Description |
146
+
| :--- | :--- | :--- | :--- |
147
+
|**timestamp**|`string`| ✅ ||
148
+
|**duration**|`integer`| optional | Server-side processing duration in milliseconds |
149
+
|**requestId**|`string`| optional ||
150
+
|**traceId**|`string`| optional ||
151
+
152
+
### Nested Shape: `CloneFlowResponse.data`
153
+
154
+
| Property | Type | Required | Description |
155
+
| :--- | :--- | :--- | :--- |
156
+
|**flow**|`{ name: string; label: string; description?: string; successMessage?: string; … }`| ✅ | The copy as stored: switched off, in `packageId`, with no lineage. |
157
+
|**packageId**|`string`| ✅ | The package the copy landed in: the one the request named, else the source's paired customization package `<base>.custom`. |
158
+
|**notice**|`string`| ✅ | One line for the administrator, in the server's words: the copy is switched off until someone switches it on, and its references are not re-pointed. |
|[Automation Protocol](/docs/references/automation)| 15 | 77 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
26
26
|[Data Protocol](/docs/references/data)| 31 | 174 | Objects, fields, queries, filters, datasources and drivers — the ObjectQL layer. |
0 commit comments