@smartkomm/plexus-cli 0.1.28 → 0.1.29

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.
@@ -1 +1 @@
1
- 28b0f9c3143c53990267725c3b53c26e45a854bd7175a82305195c0f00937168
1
+ b038cd25756875b0c1a62ce88fd1644f29caf83525fd40a7c6987c25632b19ea
@@ -192,7 +192,7 @@ whole is the operator's (ask them; do not try).
192
192
  | [offer/assignment-rule.md](references/offer/assignment-rule.md) | Mandant + Plattform | Change, test and publish who is responsible per slot; replace a person who leaves (`users unset-group` needs the operator; a school removes the membership in the app). |
193
193
  | [offer/attach-form-to-workflow.md](references/offer/attach-form-to-workflow.md) | Mandant | Bind an existing or new SmartForm to a form node. |
194
194
  | [offer/author-form-scenarios.md](references/offer/author-form-scenarios.md) | Mandant | Add a form's test scenarios and $env variables. |
195
- | [offer/author-manifest-meta.md](references/offer/author-manifest-meta.md) | Mandant | Set the manifest settings, role instances and services of an offer. |
195
+ | [offer/author-manifest-meta.md](references/offer/author-manifest-meta.md) | Mandant | Set the selection config and display order of an offer. |
196
196
  | [offer/author-smartform.md](references/offer/author-smartform.md) | Mandant | Build a SmartForm from scratch with the CLI and publish it. |
197
197
  | [offer/bind-node-input.md](references/offer/bind-node-input.md) | Mandant | Bind a node's input slot to an address, a literal or the default. |
198
198
  | [offer/completeness-check.md](references/offer/completeness-check.md) | Mandant | Wait for outstanding documents, with a deadline and a guest role. |
@@ -213,6 +213,7 @@ whole is the operator's (ask them; do not try).
213
213
  | [offer/task-family-request.md](references/offer/task-family-request.md) | Mandant | A task asks the family for data and closes itself on the answer. |
214
214
  | [offer/task-result-files.md](references/offer/task-result-files.md) | Mandant | A task result with up to 20 files. |
215
215
  | [offer/template-document-node.md](references/offer/template-document-node.md) | Mandant | Produce a letter from a Word template with a template node. |
216
+ | [offer/upgrade-bundle.md](references/offer/upgrade-bundle.md) | Mandant | Upgrade a bundle exported in an older format, answering what it will not guess. |
216
217
  | [offer/wire-contract-generator.md](references/offer/wire-contract-generator.md) | Mandant + Plattform | Pin a contract generator or package, cockpit fields, export form fields, re-stamp formExports, test the new version. |
217
218
  | [offer/workflow-default-channels.md](references/offer/workflow-default-channels.md) | Mandant | Fixed team chat channels for every application of an offer. |
218
219
  | [persons/purge-deleted-person.md](references/persons/purge-deleted-person.md) | Plattform | Delete a soft-deleted person for good. |
@@ -1,7 +1,7 @@
1
1
  # plexus-cli command reference
2
2
 
3
3
  Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
4
- 290 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
4
+ 285 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
5
5
  `--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
6
6
 
7
7
  - [Admission](#admission) (15)
@@ -17,7 +17,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
17
17
  - [Jobs](#jobs) (4)
18
18
  - [Marketing](#marketing) (6)
19
19
  - [Notifications](#notifications) (11)
20
- - [Offer](#offer) (97)
20
+ - [Offer](#offer) (92)
21
21
  - [Operations](#operations) (1)
22
22
  - [Organisation](#organisation) (8)
23
23
  - [Persons](#persons) (2)
@@ -1908,19 +1908,14 @@ List offers (manifests) + publish state for a tenant
1908
1908
 
1909
1909
  ### `offer manifest set`
1910
1910
 
1911
- Set manifest meta: applicant-mode/signature-level/window/capacity
1911
+ Set the offer's display order
1912
1912
 
1913
1913
  - **Effect:** offline — edits local files only
1914
1914
 
1915
1915
  | Option | Description |
1916
1916
  |---|---|
1917
1917
  | `--dir <value>` (required) | Bundle directory |
1918
- | `--applicant-mode <value>` | self\|proxy\|both |
1919
- | `--signature-level <value>` | wet_ink\|FES\|QES |
1920
- | `--window-start <value>` | bewerbungsfenster start (ISO date) |
1921
- | `--window-end <value>` | bewerbungsfenster end (ISO date) |
1922
- | `--capacity <value>` | Total seats (number) |
1923
- | `--sort-order <value>` | Display order among the unit's offers, lower = first ("" clears) |
1918
+ | `--sort-order <value>` (required) | Display order among the unit's offers, lower = first ("" clears) |
1924
1919
 
1925
1920
  ### `offer plan`
1926
1921
 
@@ -1942,67 +1937,6 @@ Restore an archived offer
1942
1937
  |---|---|
1943
1938
  | `--offer <value>` | Offer slug (required) |
1944
1939
 
1945
- ### `offer role add`
1946
-
1947
- Add a roleInstance to the manifest
1948
-
1949
- - **Effect:** offline — edits local files only
1950
-
1951
- | Option | Description |
1952
- |---|---|
1953
- | `--dir <value>` (required) | Bundle directory |
1954
- | `--key <value>` (required) | roleInstance key |
1955
- | `--label <value>` | Display label, German (required on add) |
1956
- | `--label-en <value>` | Display label, English (required on add; on set, alone it re-translates the current German) |
1957
- | `--custom-role-id <value>` | Tenant custom-role this slot binds |
1958
- | `--min <value>` | cardinality min |
1959
- | `--max <value>` | cardinality max |
1960
- | `--required` | Required (or --no-required) |
1961
- | `--legally-relevant` | flag: legally relevant |
1962
- | `--can-sign` | flag: can sign contract |
1963
- | `--requires-evidence` | flag: requires evidence |
1964
-
1965
- ### `offer role delete`
1966
-
1967
- Remove a roleInstance from the manifest
1968
-
1969
- - **Effect:** offline — edits local files only
1970
-
1971
- | Option | Description |
1972
- |---|---|
1973
- | `--dir <value>` (required) | Bundle directory |
1974
- | `--key <value>` (required) | roleInstance key to remove |
1975
-
1976
- ### `offer role list`
1977
-
1978
- List the manifest's roleInstances
1979
-
1980
- - **Effect:** read — changes nothing on the deployment
1981
-
1982
- | Option | Description |
1983
- |---|---|
1984
- | `--dir <value>` (required) | Bundle directory |
1985
-
1986
- ### `offer role set`
1987
-
1988
- Update a roleInstance
1989
-
1990
- - **Effect:** offline — edits local files only
1991
-
1992
- | Option | Description |
1993
- |---|---|
1994
- | `--dir <value>` (required) | Bundle directory |
1995
- | `--key <value>` (required) | roleInstance key |
1996
- | `--label <value>` | Display label, German (required on add) |
1997
- | `--label-en <value>` | Display label, English (required on add; on set, alone it re-translates the current German) |
1998
- | `--custom-role-id <value>` | Tenant custom-role this slot binds |
1999
- | `--min <value>` | cardinality min |
2000
- | `--max <value>` | cardinality max |
2001
- | `--required` | Required (or --no-required) |
2002
- | `--legally-relevant` | flag: legally relevant |
2003
- | `--can-sign` | flag: can sign contract |
2004
- | `--requires-evidence` | flag: requires evidence |
2005
-
2006
1940
  ### `offer run add`
2007
1941
 
2008
1942
  Add a run (Schuljahr) to an offer
@@ -2057,32 +1991,6 @@ Update a run: rename / dates
2057
1991
  | `--start <value>` | Start date (ISO) |
2058
1992
  | `--end <value>` | End date (ISO) |
2059
1993
 
2060
- ### `offer service add`
2061
-
2062
- Add a leistung to the manifest
2063
-
2064
- - **Effect:** offline — edits local files only
2065
-
2066
- | Option | Description |
2067
- |---|---|
2068
- | `--dir <value>` (required) | Bundle directory |
2069
- | `--key <value>` (required) | leistung key |
2070
- | `--label <value>` (required) | Display label, German |
2071
- | `--label-en <value>` (required) | Display label, English |
2072
- | `--selectable-by-applicant` | Applicant may select it |
2073
- | `--assigned-by-provider` | Provider assigns it |
2074
-
2075
- ### `offer service delete`
2076
-
2077
- Remove a leistung from the manifest
2078
-
2079
- - **Effect:** offline — edits local files only
2080
-
2081
- | Option | Description |
2082
- |---|---|
2083
- | `--dir <value>` (required) | Bundle directory |
2084
- | `--key <value>` (required) | leistung key to remove |
2085
-
2086
1994
  ### `offer set`
2087
1995
 
2088
1996
  Update an offer's title and/or pedagogic unit
@@ -2142,6 +2050,22 @@ Mark an EXISTING unit as a pedagogy unit (add its bridge) — idempotent
2142
2050
  |---|---|
2143
2051
  | `--unit <value>` (required) | Unit to upgrade — its id, config key or URL slug |
2144
2052
 
2053
+ ### `offer upgrade`
2054
+
2055
+ Rewrite a bundle exported in an older format into the current one (offline; dry run unless --write)
2056
+
2057
+ - **Effect:** offline — edits local files only
2058
+
2059
+ | Option | Description |
2060
+ |---|---|
2061
+ | `--dir <value>` (required) | Bundle directory (read) |
2062
+ | `--write` | Write the upgraded bundle (default: dry run) |
2063
+ | `--out <value>` | With --write: write a full copy here (an empty directory) instead of over --dir |
2064
+ | `--semantic <value>` | <node>.<outcome>=<granted\|rejected\|waitlisted\|other> — the meaning of an outcome the upgrade will not assume |
2065
+ | `--waitlist-policy <value>` | <node>=<arrival\|manual>:<true\|false> — a waitlist's queue order and automatic promotion |
2066
+ | `--payee <value>` | <node>=<Träger key> — the payee of an online payment |
2067
+ | `--answers <value>` | JSON file { semantics, waitlistPolicy, payee } with the same answers |
2068
+
2145
2069
  ### `offer validate`
2146
2070
 
2147
2071
  Run the publish-gate validators locally against a bundle (no deployment)
@@ -2225,7 +2149,7 @@ Insert a workflow node + sync progress layout/wiring; validate before write
2225
2149
  | `--data-decision <value>` | end only (required): commit\|discard — keep or discard the application's data at this end |
2226
2150
  | `--waitlist-order <value>` | waitlist only (required): arrival\|manual — the queue's order |
2227
2151
  | `--auto-promote <value>` | waitlist only (required): true\|false — a freed seat promotes the queue head on its own |
2228
- | `--role <value>` | roleAssign only: role key granted (must be a declared manifest roleInstance) |
2152
+ | `--role <value>` | roleAssign only: role key granted (a tenant roles.key; checked at publish) |
2229
2153
  | `--mode <value>` | roleAssign only: add\|remove\|replace (default add) |
2230
2154
  | `--person <value>` | roleAssign (required) · completenessCheck (with --guest-role): the party, an address — '$node.<formNode>.admission.beneficiary'; never defaulted |
2231
2155
  | `--from <value>` | join only: converging sources — <nodeId>:<outcome>,… (reroutes each onto this join) |
@@ -2420,7 +2344,7 @@ Edit a workflow node (label/assign-decision/form/target/contract/payment/routing
2420
2344
  | `--outcome <value>` | end only: re-author terminal outcome (approved\|rejected\|withdrawn\|expired) |
2421
2345
  | `--outcome-semantics <value>` | decision / review only: what each outcome MEANS — <outcomeId>:<granted\|rejected\|waitlisted\|other>,… |
2422
2346
  | `--data-decision <value>` | end only: commit\|discard — keep or discard the application's data at this end |
2423
- | `--role <value>` | roleAssign only: role key (declared manifest roleInstance) |
2347
+ | `--role <value>` | roleAssign only: role key (a tenant roles.key; checked at publish) |
2424
2348
  | `--mode <value>` | roleAssign only: add\|remove\|replace |
2425
2349
  | `--person <value>` | roleAssign · completenessCheck: the party, an address (e.g. '$node.form.admission.beneficiary') |
2426
2350
  | `--deadline-days <value>` | completenessCheck only: replace the deadline — N calendar days after entering |
@@ -40,7 +40,7 @@ plexus-cli config apply --env <env> --tenant <slug> --from snapshot:<path> --con
40
40
  - **Dry run first.** Without `--confirm`, `config wipe` prints per table what it would clear
41
41
  (`applications.contracts would clear 3`) and any block it would hit, and deletes nothing.
42
42
  Each table is counted in its own execution, so it works where `config targets` hits the read cap.
43
- - **Class memberships (`enrollments`) and leads (`program_interests`) are NOT application data.**
43
+ - **Class memberships (`enrollments`) and leads (`leads`) are NOT application data.**
44
44
  Memberships come from master data (manual or import) and live in `contract-setup` with their
45
45
  classes; leads (Interessenten) are recorded before any application and live in `masterdata`.
46
46
  `--target applications` leaves both alone; the dry run lists them under their own target.
@@ -96,27 +96,6 @@ plexus-cli config apply --env <env> --tenant <slug> --from snapshot:<path> --con
96
96
  (`work_items` counts only application tasks). Tables only the cascade reaches
97
97
  (`notifications*`, `access_audit`, `activities`, `storage_uploads`) are not in that listing —
98
98
  check them with `plexus-cli call` if needed.
99
- - **Narrow targets — a slice for a schema rollout, only when named.**
100
- `--target applications-without-finance` clears the admission rows and keeps every finance
101
- runtime row: it unsets a finance row's link to an application (dry run:
102
- `contract_generation_runs.applicationId (unset, row kept) would clear N`), reports a link
103
- inside immutable evidence it cannot unset (`contract_snapshots.document.sourceArtifactId (row
104
- kept, still names a deleted artifacts row)`), deletes the draft party shells the applications
105
- created, then the application rows with their activities and letters
106
- (`activities (goes with its application)`). Real persons stay. It is blocked while a discard,
107
- a signing process or a Stripe payment of an application is still open. `--target
108
- offer-definitions` clears only the three definition tables (programs, runs, stages, document
109
- templates stay; a lead or the contract setup does not block it) and is blocked while any
110
- application, form instance or artifact exists — run the applications clear first, then
111
- re-publish with `offer apply --publish`. `--target upload-tickets` clears the tenant's open
112
- upload tickets (`issued`, `pending`) and their unbound objects; a consumed row is the claim of
113
- a referenced object and is never cleared. None of them is part of `--target all` or
114
- `config targets`, none takes `--cascade`; a second run clears nothing.
115
- - **Consumed upload rows are migrated, not cleared — after `upload-tickets`.** That is a
116
- platform operator's migration (`consumedUploadsToClaimShape`, with a read-only preflight),
117
- not a CLI command; it deletes no row and no file. A claim whose form is gone is marked
118
- `orphaned` (not `shared`); nothing deletes its file until the maintainer approves that step —
119
- the preflight's `orphans` sizes them per tenant and surface. See the CLI README, `wipe`.
120
99
  - **Reprovisioning `foundation` mints new passwords.** The wipe took the tenant's users with
121
100
  it, so the re-apply creates their login accounts again and prints each generated password
122
101
  once. Run that re-apply with `--out creds.csv --quiet` if the terminal is shared — see
@@ -18,9 +18,12 @@ staff member wants"). Do not use the level to quiet staff mail.
18
18
 
19
19
  **Current stance:** every tenant — prod, staging and the `test` demo tenant —
20
20
  runs `loginOnly` until the platform operator decides otherwise. Switching a real
21
- school to `all` is that decision, not a routine step. Locally, a reseeded `test` tenant is at `loginOnly` too; to see a
22
- rendered admission, family-task or school-chat letter set it to `all` on your
23
- own deployment (`--env local`). Staff letters render at both levels.
21
+ school to `all` is that decision, not a routine step. Only a local full seed
22
+ puts the `test` demo tenant at `all`, so locally every admission, family-task and
23
+ school-chat letter is rendered (a local deployment sends no mail); the template
24
+ staging and prod apply stays `loginOnly`. On a local deployment that was not
25
+ seeded that way, set it to `all` yourself (`--env local`). Staff letters render
26
+ at both levels.
24
27
 
25
28
  ## What it is
26
29
 
@@ -3,8 +3,8 @@
3
3
  **When to use:** an offer's admission workflow needs another step (an approval
4
4
  gate, a waitlist holding node, a selection terminus, another form, …) and you want
5
5
  the graph + progress board kept in sync automatically — instead of hand-editing
6
- `workflow.json` (graph + `progressWiring.mappings`) and `manifest.json`
7
- (`progressLayout` states + columns) in lockstep.
6
+ `workflow.json` (graph, `progressLayout` states + columns and
7
+ `progressWiring.mappings`) in lockstep.
8
8
 
9
9
  ## Prerequisites
10
10
  - **Env / scope:** none for authoring — `offer workflow node add|delete|list` and
@@ -113,9 +113,9 @@ operator.
113
113
  join; the join's own onward edge defaults to the end node (override with
114
114
  `--outcomes done:<target>`). Multi-input into a join is the one legal
115
115
  many-to-one shape (the publish gate rejects multi-input on non-join nodes).
116
- - **`roleAssign --role <key>`** grants a person-lifecycle role. `--role` is
117
- validated **offline** against the manifest's declared `roleInstances` (fail
118
- loud if absent — declare it first with `offer role add`). `--mode`
116
+ - **`roleAssign --role <key>`** grants a person-lifecycle role. `--role` is a
117
+ role key of the tenant's catalog (`roles.key`); the catalog is unknown
118
+ offline, so publish checks it. `--mode`
119
119
  is `add` (default) | `remove` | `replace`; `--person '<address>'` is required —
120
120
  the party that gets the role, a party leaf of a form
121
121
  (`--person '$node.form.admission.beneficiary'`). Never defaulted.
@@ -1,9 +1,13 @@
1
- # Author the manifest "meta" layer
1
+ # Author the manifest layer
2
2
 
3
- **When to use:** configure an offer's manifest settings that aren't the form or the
4
- workflow — the applicant mode, signature level, application window, total capacity,
5
- the `roleInstances` (legal roles like Erziehungsberechtigte),
6
- and the `leistungen` — entirely from the CLI instead of hand-editing `manifest.json`.
3
+ **When to use:** set the offer's display order from the CLI. `manifest.json` carries no
4
+ key any more (`{}`): the offer title is `bundle.yaml` `label`, the progress layout is
5
+ `workflow.json` `progressLayout`, capacity and the application window belong to the
6
+ cohort (`offer capacity set`, `offer run …`), and the waiting list's order and
7
+ automatic promotion are the waitlist node's required inputs `waitlistOrder`
8
+ (arrival|manual) and `autoPromoteOnVacancy` (true|false) — `offer workflow node add
9
+ --type waitlist --waitlist-order … --auto-promote …`, `offer workflow node set-input`,
10
+ or the IDE's PARAMETER column.
7
11
 
8
12
  ## Prerequisites
9
13
  - An offer bundle on disk (`offer init …` or `offer export …`).
@@ -14,31 +18,7 @@ and the `leistungen` — entirely from the CLI instead of hand-editing `manifest
14
18
 
15
19
  ## Steps
16
20
  ```bash
17
- # Top-level settings. Enum values are validated fail-loud (self|proxy|both,
18
- # wet_ink|FES|QES).
19
- plexus-cli offer manifest set --dir <bundle> \
20
- --applicant-mode both --signature-level FES \
21
- --window-start 2026-02-01 --window-end 2026-05-31 --capacity 30
22
-
23
- # The waiting list's order and automatic promotion are NOT manifest settings:
24
- # they are the waitlist node's required inputs `waitlistOrder` (arrival|manual)
25
- # and `autoPromoteOnVacancy` (true|false) — `offer workflow node add --type
26
- # waitlist --waitlist-order … --auto-promote …`, `offer workflow node set-input`,
27
- # or the IDE's PARAMETER column.
28
-
29
- # roleInstances — legal/contract roles. --custom-role-id binds the tenant custom-role.
30
- # A role's (and a service's) label is { de, en }: --label AND --label-en on add.
31
- plexus-cli offer role add --dir <bundle> --key erzb1 --label "Erziehungsberechtigte:r 1" --label-en "Guardian 1" \
32
- --custom-role-id role_eb --min 1 --max 2 --legally-relevant --can-sign
33
- plexus-cli offer role set --dir <bundle> --key erzb1 --max 3 --requires-evidence
34
- plexus-cli offer role list --dir <bundle>
35
- plexus-cli offer role delete --dir <bundle> --key erzb2 # remove a roleInstance
36
-
37
- # leistungen — selectable/assigned services.
38
- plexus-cli offer service add --dir <bundle> --key betreuung --label "Nachmittagsbetreuung" --label-en "Afternoon care" --selectable-by-applicant
39
- plexus-cli offer service delete --dir <bundle> --key betreuung # remove a Leistung
40
-
41
- # Display order among the unit's offers (lower = first; "" clears). Handle-level
21
+ # Display order among the unit's offers (lower = first; "" clears). A family
42
22
  # property like the title — lives on bundle.yaml, applied via createManifest.
43
23
  plexus-cli offer manifest set --dir <bundle> --sort-order 20
44
24
 
@@ -49,8 +29,8 @@ plexus-cli --env <env> offer apply --publish --dir <bundle>
49
29
 
50
30
  ## Verify
51
31
  ```bash
52
- plexus-cli offer role list --dir <bundle> # roleInstances reflect the edits
53
32
  plexus-cli offer validate --dir <bundle> # "local validation clean"
33
+ cat <bundle>/manifest.json # {}
54
34
  ```
55
35
 
56
36
  ## Idempotency / gotchas
@@ -63,7 +43,7 @@ plexus-cli offer validate --dir <bundle> # "local validation clean"
63
43
  "· Aufnahme 2026/27" in the title makes the cycle show twice. Levels/runs are managed
64
44
  with `offer level …` / `offer run …`, not the title.
65
45
  - **`--title` (offer label) is the offer-title SoT — `--program-name` is separate.**
66
- `offer set --title` (+ `--title-en`) writes the offer title (`offer_versions.label`), the single source the staff Angebote
46
+ `offer set --title` (+ `--title-en`) writes the offer title (`offers.label`), the single source the staff Angebote
67
47
  tree, external portal, and applicant "Meine Bewerbungen" all read. The underlying
68
48
  master-data `programs.name` is a *copy* made at authoring time that only shows in the
69
49
  staff master-data admin; it can drift from the label. Use `offer set --program-name
@@ -76,20 +56,12 @@ plexus-cli offer validate --dir <bundle> # "local validation clean"
76
56
  without a sortOrder fall back to creation-time / alphabetical respectively.
77
57
  - **Validate-before-write.** Every mutator runs the real publish gate first; on any
78
58
  error it writes **nothing**.
79
- - **Enum values are checked client-side, fail-loud.** The manifest publish gate
80
- (`validateManifestBlob`) enforces required fields + roleInstances/leistungen *structure*
81
- (unique keys, customRoleId, cardinality) but NOT the enum *values* of
82
- applicantMode/signatureLevel — so the CLI validates those at the boundary.
83
- - **`customRoleId` resolution is server-side.** The CLI authors the binding; whether
84
- `--custom-role-id` resolves to a real tenant custom-role is checked at runtime, not
85
- offline (the bundle has no tenant role catalog).
86
- - **No graph↔role cross-check.** The static graph carries no reference to a
87
- `roleInstance.key` (those are referenced only by runtime persons; approval approvers
88
- reference tenant permission *groups*, validated server-side) — so there is nothing
89
- offline to cross-validate beyond the structure the manifest gate already enforces.
90
- - **`manifest set` is additive per-flag.** Pass only the flags you want to change.
91
- A `selection` block a bundle still carries is read by nothing.
59
+ - **A retired manifest key is refused, never dropped.** `offer validate` (and apply)
60
+ refuse every key by name — `selection`, `capacity`, `roleInstances`, `leistungen`,
61
+ `applicantMode`, `signatureLevel`, `bewerbungsfenster`, `id`, `label`, `version`,
62
+ `progressLayoutId` — with "Delete the line". `progressLayout` moves to `workflow.json`
63
+ (without a workflow: delete it).
92
64
 
93
65
  ## Related
94
66
  - [Author a SmartForm as code](./author-smartform.md) · [Edit a workflow node](./edit-workflow-node.md).
95
- - Command reference: `plexus-cli offer manifest --help`, `plexus-cli offer role --help`, `plexus-cli offer service --help`.
67
+ - Command reference: `plexus-cli offer manifest set --help`.
@@ -100,12 +100,9 @@ plexus-cli offer validate --dir <bundle> # "local validation clean"
100
100
  `apply --publish` over an already-published form will be rejected by the server.
101
101
  - **Re-publishing = new version.** Each `offer apply --publish` with a changed form
102
102
  definition creates a new `smart_form_versions` row (never edits in place).
103
- - **Workflows pin the form version.** A published workflow is pinned to the form
104
- version that was current at *workflow*-publish time (`smartFormPins`). A new form
105
- version does **not** propagate automatically — the workflow must be re-published.
106
- `offer apply --publish` over the **whole bundle** re-publishes the workflow too, so
107
- the full-bundle path picks up the new form; a standalone form publish would leave
108
- existing workflows on the old version.
103
+ - **A form belongs to its offer generation.** A form node finds its form by slug on
104
+ the same generation; `offer apply --publish` over the **whole bundle** publishes
105
+ form and workflow together.
109
106
  - **Effects / repeated / computed fields** are CLI-authorable (`offer form effect|repeated|computed`).
110
107
  The offline gate checks structure + refs + effect-graph + a person's name mapping
111
108
  (`person.without-name-mapping`) + organization `nameFrom`/`fieldMap.from`
@@ -127,7 +127,7 @@ name; a deployment that does not send mail records the letter in Dev Rail
127
127
  then carries two columns with one label, and `node add` refuses the write —
128
128
  for ANY node type with such an event (`waitlist`, `decision`, …), not only this
129
129
  one. Until `node add` can map events onto existing states, author the node in
130
- `workflow.json` + the states/columns/wiring in `manifest.json`/`workflow.json`
130
+ `workflow.json` + the states/columns/wiring in `workflow.json`
131
131
  by hand (shape: the Verify `jq` output above) and gate it with `offer validate`
132
132
  / `offer apply --publish`. Scaffolded bundles (`offer init`) are not affected.
133
133
  - **Running applications keep their pinned version** — see
@@ -50,5 +50,5 @@ plexus-cli --env <env> --tenant <slug> offer status --offer gs-neustadt # prog
50
50
  once an offer is linked, fails with `[unit/pedagogyUnitInUse]`.
51
51
 
52
52
  ## Related
53
- - [Author the manifest meta layer](./author-manifest-meta.md) · [Author a SmartForm as code](./author-smartform.md).
53
+ - [Author the manifest layer](./author-manifest-meta.md) · [Author a SmartForm as code](./author-smartform.md).
54
54
  - Command reference: `plexus-cli offer unit --help`.
@@ -119,11 +119,11 @@ addresses — display only, never a finding, the exit code stays 0:
119
119
  your export, or your copy was not a fresh export. Re-export; never apply an older copy
120
120
  (an earlier export, a backup): it can be behind prod in one place and ahead in
121
121
  another, and apply rolls prod back where it is behind.
122
- - **A data migration rewrites the live graph, not your copy.** Example: every
123
- creating form node carries `notifications.submitted` (the receipt), written by the
124
- migration `bindSubmitReceiptInGraphs`. A copy exported before that migration ran lacks
125
- it, the publish accepts the missing binding (the event is optional), and the offer stops
126
- sending receipts without any error. Export after the deploy, and use a `plexus-cli`
122
+ - **A copy in an older format misses what the current format carries.** Example: every
123
+ creating form node carries `notifications.submitted` (the receipt). A copy exported
124
+ before the receipt became a binding lacks it, the publish accepts the missing binding
125
+ (the event is optional), and the offer stops sending receipts without any error —
126
+ `offer upgrade --dir <bundle>` binds it. Export after the deploy, and use a `plexus-cli`
127
127
  linked from a checkout that has the change — an older one refuses the new binding offline
128
128
  (`[notification/unknownEvent]`).
129
129
  - **A change that needs new platform code ships in two steps.** A resolver implementation,
@@ -0,0 +1,106 @@
1
+ # Upgrade a bundle exported in an older format
2
+
3
+ **Use it to** bring an offer bundle that was exported before the current bundle format
4
+ into that format, once, before it is validated, planned and applied again — for example
5
+ after the platform changed how outcome meanings, the start node, the waitlist policy or
6
+ the assignment slots are written down.
7
+
8
+ ## When you need it
9
+
10
+ `offer validate`, `offer plan` and `offer apply` refuse such a bundle as a whole:
11
+
12
+ ```
13
+ Refused: [BUNDLE_NEEDS_UPGRADE] offer: …/bundle.yaml is in an older bundle format
14
+ (manifest.json with `id`, `label`, …; decision outcomes without a meaning; …).
15
+ Run `plexus-cli offer upgrade --dir <bundle>` first …
16
+ ```
17
+
18
+ No line-by-line editing: the upgrade does every rewrite and prints each one.
19
+
20
+ ## Prerequisites
21
+
22
+ - The bundle on disk, freshly exported (`offer export --env <env> --out <dir>`). For a live
23
+ tenant: a private scratch directory, never a shared or versioned place
24
+ (see `edit-live-tenant-offer.md`).
25
+ - No deployment is needed — the upgrade runs offline.
26
+
27
+ ## Steps
28
+
29
+ ```bash
30
+ OLD=<exported bundle dir>
31
+ NEW=<fresh empty dir>
32
+
33
+ # 1. Dry run — writes nothing. Every change, and every question it will not guess.
34
+ plexus-cli offer upgrade --dir $OLD
35
+ ```
36
+
37
+ Where the old platform filled a value by a default, the upgrade writes the value the
38
+ process **ran with** and prints the row as `DEFAULT`; the `answer` column names the flag
39
+ that set it — the same flag with another value overrides it (maintainer 2026-10-31,
40
+ „alles wie bisher"):
41
+
42
+ | `DEFAULT` row | What it ran with | Override |
43
+ |---|---|---|
44
+ | an outcome id with no known meaning (`einladen`, a review's `reviewed`) | „Sonstige Entscheidung“ — `other` | `--semantic <node>.<outcome>=<meaning>` — a review outcome may only be `granted` or `other` |
45
+ | a waitlist whose bundle stated no (complete) order / automatic promotion | the old default `arrival` / `false` for what was left out | `--waitlist-policy <node>=<arrival\|manual>:<true\|false>` |
46
+ | an input binding no slot declares (a leftover from a generator switch) | read by no slot — deleted | none; publish refuses an undeclared input |
47
+
48
+ The status line counts them (`… (N answers set to the former behaviour — see DEFAULT)`).
49
+ Rows marked `REFUSED` still need an answer — nothing is written while one is open:
50
+
51
+ | Refusal | Why it is asked | Answer |
52
+ |---|---|---|
53
+ | `collectPayment/payeeMissing` | an online payment must name the Träger the money goes to | `--payee <node>=<Träger key>` |
54
+ | `outcome/semanticNotAllowed`, `outcome/formerMeaningNotAllowed` | an answer, or the meaning the outcome ran with, that its node type does not allow (a review never rejects) | `--semantic <node>.<outcome>=<meaning>` |
55
+ | `waitlist/selectionMalformed` | the bundle's `selection` holds a value outside the vocabulary | `--waitlist-policy <node>=<arrival\|manual>:<true\|false>` |
56
+ | `task/userWithoutTeam`, `eventTrigger/…`, `templateStamp/…`, … | only a person can decide (a task with a fixed person and no team, …) | edit the file in `$OLD`, then run again |
57
+
58
+ ```bash
59
+ # 2. Write a full copy (nothing is written while a refusal is open). Answers are
60
+ # needed only for REFUSED rows, or to override a DEFAULT.
61
+ plexus-cli offer upgrade --dir $OLD --write --out $NEW
62
+ ```
63
+
64
+ To keep the answers with the bundle's history, put them in a JSON file instead:
65
+
66
+ ```json
67
+ {
68
+ "semantics": { "<node>.<outcome>": "other" },
69
+ "waitlistPolicy": { "<node>": { "waitlistOrder": "arrival", "autoPromoteOnVacancy": false } },
70
+ "payee": { "<node>": "<Träger key>" }
71
+ }
72
+ ```
73
+
74
+ ```bash
75
+ plexus-cli offer upgrade --dir $OLD --answers answers.json --write --out $NEW
76
+ ```
77
+
78
+ ```bash
79
+ # 3. Validate, then plan and apply as usual.
80
+ plexus-cli offer validate --dir $NEW
81
+ plexus-cli --env <env> offer plan --tenant <slug> --dir $NEW
82
+ plexus-cli --env <env> offer apply --tenant <slug> --dir $NEW --publish
83
+ ```
84
+
85
+ ## Verify
86
+
87
+ - Step 2 ends with `written to <dir>`; `offer validate --dir $NEW` shows no error.
88
+ - Running `offer upgrade --dir $NEW` again prints `already current — nothing to do`.
89
+
90
+ ## Idempotency / gotchas
91
+
92
+ - **A `DEFAULT` row keeps the process as it ran** — `other` for an unknown outcome,
93
+ `arrival:false` for a waitlist. Any other answer changes it. Either way it is now
94
+ written in the bundle, and the report of the run is the record of what was set.
95
+ - **Deleted keys are reported, not kept.** The manifest's old keys (`capacity`,
96
+ `leistungen`, `bewerbungsfenster`, …) were read by nothing; the report names each with
97
+ the place its fact lives now. Keep the original export if you want them for reference.
98
+ - **`--out` must be empty**; without `--out`, `--write` rewrites `--dir` in place.
99
+ - A stamped generator schema in an export may be older than the generator it names: an
100
+ undeclared binding on a contract node is usually a leftover from a generator switch —
101
+ the `DEFAULT` row deletes it; compare it with the stamped fields if in doubt.
102
+
103
+ ## Related
104
+
105
+ - `edit-live-tenant-offer.md` — export, plan and apply a live tenant's offer.
106
+ - `publish-offer-bundle.md` — take the upgraded bundle live.