@smartkomm/plexus-cli 0.1.32 → 0.1.34

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 (33) hide show
  1. package/README.md +50 -24
  2. package/dist/cli.mjs +1382 -1023
  3. package/dist/skill/.managed-by-plexus-cli +1 -1
  4. package/dist/skill/SKILL.md +26 -16
  5. package/dist/skill/references/audit/answer-access-request.md +2 -2
  6. package/dist/skill/references/commands.md +1072 -742
  7. package/dist/skill/references/config/init-tenant.md +4 -4
  8. package/dist/skill/references/config/platform-setup-export.md +2 -2
  9. package/dist/skill/references/notifications/debug-mail-delivery.md +8 -8
  10. package/dist/skill/references/notifications/reword-a-letter.md +2 -2
  11. package/dist/skill/references/notifications/trace-a-login.md +2 -2
  12. package/dist/skill/references/offer/assignment-rule.md +5 -5
  13. package/dist/skill/references/offer/task-result-files.md +1 -1
  14. package/dist/skill/references/persons/purge-deleted-person.md +2 -2
  15. package/dist/skill/references/resolver/register-input-keys.md +7 -7
  16. package/dist/skill/references/retention/erase-due-parties.md +3 -3
  17. package/dist/skill/references/signing/connect-a-school.md +3 -3
  18. package/dist/skill/references/signing/rotate-the-key.md +3 -3
  19. package/dist/skill/references/users/add-platform-admin.md +8 -8
  20. package/dist/skill/references/users/add-platform-user.md +2 -2
  21. package/dist/skill/references/users/add-tenant-admin.md +6 -6
  22. package/dist/skill/references/users/change-login-email.md +6 -6
  23. package/dist/skill/references/users/cli-access-for-tenant-admin.md +2 -2
  24. package/dist/skill/references/users/delete-permission-group.md +3 -3
  25. package/dist/skill/references/users/grant-cross-tenant-access.md +6 -6
  26. package/dist/skill/references/users/grant-feedback-assignable.md +4 -4
  27. package/dist/skill/references/users/manage-school-users.md +19 -2
  28. package/dist/skill/references/users/set-password.md +10 -10
  29. package/dist/skill/references/users/set-staff-config-key.md +70 -0
  30. package/dist/skill/references/users/use-test-account.md +2 -2
  31. package/dist/skill/references/worker-ops/debug-worker-jobs.md +7 -7
  32. package/dist/spec.snapshot.json +1 -1
  33. package/package.json +1 -1
@@ -19,7 +19,7 @@ scaffold.
19
19
  ([CLI access for a tenant admin](../users/cli-access-for-tenant-admin.md)).
20
20
  - **Tooling:** an installed, current `plexus-cli` (`plexus-cli --help`).
21
21
  - **Prod:** every writing run against prod needs `--allow-prod` (`config apply`,
22
- `users provision`); without it the CLI refuses.
22
+ `platform users provision`); without it the CLI refuses.
23
23
 
24
24
  ## Decide before you apply
25
25
 
@@ -60,7 +60,7 @@ plexus-cli --env <env> config apply --tenant <slug> \
60
60
  # 5. Provision the generic admin login (separate auth plane — see related playbook).
61
61
  # Convention: admin@<short>.plexus.swop.schule, name "<Short> Administration",
62
62
  # so a platform operator always has one login per school that belongs to no person.
63
- plexus-cli --env <env> --tenant <slug> users provision admin@<short>.plexus.swop.schule \
63
+ plexus-cli --env <env> --tenant <slug> platform users provision admin@<short>.plexus.swop.schule \
64
64
  --name "<Short> Administration" --group tenant_admin --out creds.csv --quiet
65
65
  ```
66
66
 
@@ -72,7 +72,7 @@ Staff of the school get their own accounts the same way (their address, their na
72
72
  the generic admin is not shared with them.
73
73
 
74
74
  **Created for you, not by you:** the apply also provisions the tenant's test applicant
75
- `test@example.com` („Test Bewerber"), which then shows up in `users list` with the new
75
+ `test@example.com` („Test Bewerber"), which then shows up in `platform users list` with the new
76
76
  slug. That is intended — see [Use a tenant's test account](../users/use-test-account.md).
77
77
 
78
78
  The scaffold emits the smallest config `apply` accepts: the tenant block (all
@@ -112,7 +112,7 @@ offers on the pedagogy unit: `offer init --unit <unit key> --title … --title-e
112
112
  by design (`tenants` is excluded from every wipe target). The CLI prints a note when
113
113
  you wipe a non-`all` target so this is never a surprise.
114
114
  - Staff accounts are a **separate plane** (Better Auth) — the config never creates
115
- logins; provision them with `users provision` (step 5).
115
+ logins; provision them with `platform users provision` (step 5).
116
116
 
117
117
  ## Related
118
118
  - [Onboard / establish a tenant](./onboard-tenant.md) — establish from an existing
@@ -29,7 +29,7 @@ plexus-cli setup apply --env <env> --platform --dir ~/setup-exports/platform-<da
29
29
 
30
30
  ```bash
31
31
  plexus-cli setup plan --env <env> --platform --dir <dir> # no create, no update left
32
- plexus-cli generator input-key list --env <env> # the restored registry
32
+ plexus-cli platform generator input-key list --env <env> # the restored registry
33
33
  ```
34
34
 
35
35
  ## Idempotency / gotchas
@@ -40,7 +40,7 @@ plexus-cli generator input-key list --env <env> # the restored regist
40
40
  - A deprecation travels one way: an entry deprecated in the export is deprecated on the target;
41
41
  an entry the target already deprecated stays deprecated, so an older export restores cleanly.
42
42
  - `--prune` is refused for the registry: sealed revisions name its keys. Deprecate an entry
43
- instead (`generator input-key deprecate`).
43
+ instead (`platform generator input-key deprecate`).
44
44
  - A tenant's `setup.json` lists the platform keys it names (`platformRefs`). `setup plan` of a
45
45
  tenant shows a key the target lacks as "missing platform key", and `setup apply` refuses until
46
46
  the platform export is applied — restore the platform first, then the tenants.
@@ -6,8 +6,8 @@ console, or a `backend:convex` GlitchTip issue tagged `area=notifications`.
6
6
  ## 1. Is the sweeper alive, and is anything dead?
7
7
 
8
8
  ```bash
9
- plexus-cli --env staging notifications sweeper-status
10
- plexus-cli --env staging notifications list --status dead
9
+ plexus-cli --env staging platform notifications sweeper-status
10
+ plexus-cli --env staging platform notifications list --status dead
11
11
  ```
12
12
 
13
13
  `ranAt` older than a few minutes ⇒ the cron is not firing (deploy broke?).
@@ -16,11 +16,11 @@ plexus-cli --env staging notifications list --status dead
16
16
  ## 2. Find the delivery for a person
17
17
 
18
18
  ```bash
19
- plexus-cli --env staging notifications list --to parent@example.org --since 2d
20
- plexus-cli --env staging notifications list --template account.loginLink --since 24h
19
+ plexus-cli --env staging platform notifications list --to parent@example.org --since 2d
20
+ plexus-cli --env staging platform notifications list --template account.loginLink --since 24h
21
21
  ```
22
22
 
23
- For a sign-in problem start with `users login-trail` instead — see
23
+ For a sign-in problem start with `platform users login-trail` instead — see
24
24
  [Trace why someone could not sign in](./trace-a-login.md).
25
25
 
26
26
  Statuses: `queued` (waiting / backoff), `sending` (in flight), `sent` (relay
@@ -31,7 +31,7 @@ address, in `redirect` only `.invalid`), `dead` (gave up).
31
31
  ## 3. Read the evidence
32
32
 
33
33
  ```bash
34
- plexus-cli --env staging notifications show <deliveryId>
34
+ plexus-cli --env staging platform notifications show <deliveryId>
35
35
  ```
36
36
 
37
37
  | `errorCode` | Means | Do |
@@ -51,7 +51,7 @@ relay line. `possibleDuplicate: true` means attempt N may already have landed.
51
51
  ## 4. Prove the configuration end to end
52
52
 
53
53
  ```bash
54
- plexus-cli --env staging notifications self-test --to <your-address>
54
+ plexus-cli --env staging platform notifications self-test --to <your-address>
55
55
  ```
56
56
 
57
57
  Verifies the connection + credentials, sends one mail, returns the SMTP
@@ -61,7 +61,7 @@ really goes to `--to`.
61
61
  ## 5. Retry
62
62
 
63
63
  ```bash
64
- plexus-cli --env staging notifications retry <deliveryId>
64
+ plexus-cli --env staging platform notifications retry <deliveryId>
65
65
  ```
66
66
 
67
67
  Only `dead` rows. It is a fresh attempt through the normal claim path — the
@@ -64,8 +64,8 @@ plexus-cli --env local --tenant test notifications letters show applicant.tasksO
64
64
  # b) Trigger the letter (for applicant.tasksOpen: open an external task on an
65
65
  # application — e.g. a workflow task addressed to the family), then find its
66
66
  # delivery and read the body that was actually rendered:
67
- plexus-cli --env local notifications list --limit 20
68
- plexus-cli --env local notifications show <deliveryId> --json | grep -A12 '"letter"'
67
+ plexus-cli --env local platform notifications list --limit 20
68
+ plexus-cli --env local platform notifications show <deliveryId> --json | grep -A12 '"letter"'
69
69
  ```
70
70
 
71
71
  `letter.text` (and `letter.html`) carry the reworded sentence, and
@@ -12,10 +12,10 @@ A platform token with `_platform.users.manage` (sessions name IP addresses) and
12
12
 
13
13
  ```bash
14
14
  # Everything the platform still knows about the address, oldest first.
15
- plexus-cli --env prod users login-trail ada@example.com --since 24h
15
+ plexus-cli --env prod platform users login-trail ada@example.com --since 24h
16
16
 
17
17
  # Only the login page's letters to that address, with the relay's answer.
18
- plexus-cli --env prod notifications list --template account.loginLink --to ada@example.com --since 24h
18
+ plexus-cli --env prod platform notifications list --template account.loginLink --to ada@example.com --since 24h
19
19
  ```
20
20
 
21
21
  `login-trail` prints one time-ordered list:
@@ -131,8 +131,8 @@ a fixed person.
131
131
 
132
132
  ## A staff member leaves
133
133
 
134
- A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`users revoke`, `users unset-group`,
135
- `users archive`), leave a team whose slot names them, and a team a rule has a slot
134
+ A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`platform users revoke`, `tenant-users groups revoke`,
135
+ `platform users archive`), leave a team whose slot names them, and a team a rule has a slot
136
136
  for cannot be deleted — refused (`[CONFLICT] [assignment/ruleReferences] …`), naming offer
137
137
  (label + status), slot and row. The check reads every `wip` and published offer
138
138
  version (archived ones only run pinned test starts, which fail loud instead). Order:
@@ -144,11 +144,11 @@ version (archived ones only run pinned test starts, which fail loud instead). Or
144
144
  3. Only then remove the group membership:
145
145
 
146
146
  ```bash
147
- plexus-cli --env staging --tenant <slug> users unset-group ada@example.com --group sekretariat \
148
- --replace-with <successorConfigKey>
147
+ plexus-cli --env staging --tenant <slug> tenant-users groups revoke ada@example.com --group sekretariat \
148
+ --successor <successor-email> --confirm
149
149
  ```
150
150
 
151
- `--replace-with` only hands the person's **active applications** over (required
151
+ `--successor` only hands the person's **active applications** over (required
152
152
  while they are responsible for any); it never rewrites a rule.
153
153
  4. Nothing to export or keep elsewhere — the server is the source of truth.
154
154
 
@@ -22,7 +22,7 @@ teacher's trial-day feedback with an English and a maths placement sheet, as PDF
22
22
  `team:<group>` chat that means the members of that group plus platform admins. A
23
23
  `tenant_admin` who is in no such group sees neither the text nor the files. Before
24
24
  choosing `team:principals`, check that the readers really hold that group (`plexus-cli
25
- users show <email>`).
25
+ platform users show <email>`).
26
26
 
27
27
  ## CLI
28
28
 
@@ -22,14 +22,14 @@ exists only here.
22
22
  ## Steps
23
23
  1. **Plan** (no write — the default):
24
24
  ```bash
25
- plexus-cli --env <env> --tenant <slug> persons purge <partyId>
25
+ plexus-cli --env <env> --tenant <slug> platform persons purge <partyId>
26
26
  ```
27
27
  Prints the person, when staff deleted it, the rows per table (the party, its
28
28
  persons row, roles, values and their links, placements, enrollments, search
29
29
  entries, `value_history`, …) and every receipt that refuses the commit.
30
30
  2. **Commit** once the plan shows no `Refused` block:
31
31
  ```bash
32
- plexus-cli --env <env> --tenant <slug> persons purge <partyId> --confirm [--allow-prod]
32
+ plexus-cli --env <env> --tenant <slug> platform persons purge <partyId> --confirm [--allow-prod]
33
33
  ```
34
34
 
35
35
  ## Verify
@@ -12,26 +12,26 @@ platform-wide input registry — sealing refuses it until the key is registered.
12
12
  ## Steps
13
13
  ```bash
14
14
  # One key.
15
- plexus-cli --env <env> generator input-key create --key childBirthDate \
15
+ plexus-cli --env <env> platform generator input-key create --key childBirthDate \
16
16
  --label "Geburtsdatum" --label-en "Date of birth" \
17
17
  --description "Geburtsdatum des Kindes" --description-en "The child's date of birth" --scalar date
18
- plexus-cli --env <env> generator input-key create --key payerPartyId \
18
+ plexus-cli --env <env> platform generator input-key create --key payerPartyId \
19
19
  --label "Zahler" --label-en "Payer" --description "Wer zahlt" --description-en "Who pays" --entity party
20
20
 
21
21
  # Many keys from a file — a JSON array of
22
22
  # { "key", "label": {de,en}, "description": {de,en},
23
23
  # "value": { "valueKind": "scalar", "scalarType": "date" } | { "valueKind": "entity", "entityKind": "party" } }
24
- plexus-cli --env <env> generator input-key plan --file <scratch>/input-keys.json # create | same | differs | deprecated
25
- plexus-cli --env <env> generator input-key apply --file <scratch>/input-keys.json # registers the missing ones
24
+ plexus-cli --env <env> platform generator input-key plan --file <scratch>/input-keys.json # create | same | differs | deprecated
25
+ plexus-cli --env <env> platform generator input-key apply --file <scratch>/input-keys.json # registers the missing ones
26
26
 
27
27
  # A key that should no longer be used in new drafts.
28
- plexus-cli --env <env> generator input-key deprecate --key childBirthDate
28
+ plexus-cli --env <env> platform generator input-key deprecate --key childBirthDate
29
29
  ```
30
30
 
31
31
  ## Verify
32
32
  ```bash
33
- plexus-cli --env <env> generator input-key list
34
- plexus-cli --env <env> generator input-key plan --file <scratch>/input-keys.json # every row: same
33
+ plexus-cli --env <env> platform generator input-key list
34
+ plexus-cli --env <env> platform generator input-key plan --file <scratch>/input-keys.json # every row: same
35
35
  ```
36
36
 
37
37
  ## Idempotency / gotchas
@@ -14,7 +14,7 @@ rule reaches stays, with all its data, until someone runs this recipe.
14
14
  >
15
15
  > - **Who:** the Plexus platform operator (whoever holds a
16
16
  > `_platform.config.manage` token for prod — the right of the other person
17
- > hard delete, `persons purge`).
17
+ > hard delete, `platform persons purge`).
18
18
  > - **How often:** **monthly**, on the first working day, for every tenant with a
19
19
  > rule; additionally within a week whenever the weekly warning appears.
20
20
  > - **Record:** keep the `--json` output of each `apply` run in
@@ -89,11 +89,11 @@ names stays).
89
89
  above the relation engine's budget (`MAX_PLAN_ROWS` rows or the index-read cap) is
90
90
  a bug-class error, not a block — `plan` aborts with `[relations] deletion plan
91
91
  exceeds …` naming the person, and the weekly report marks the tenant `scanFailed`.
92
- Review that person by hand (`persons purge` after a soft delete, or
92
+ Review that person by hand (`platform persons purge` after a soft delete, or
93
93
  split its data) before the rest can run.
94
94
  - **Soft-deleted persons („gelöscht")** are due like any other and marked so.
95
95
  - **One person now** (staff deleted someone and the family asks for erasure) is
96
- not this recipe: [`persons purge`](../persons/purge-deleted-person.md).
96
+ not this recipe: [`platform persons purge`](../persons/purge-deleted-person.md).
97
97
  - **Writes need `--env` named; prod needs `--allow-prod`.**
98
98
 
99
99
  ## Related
@@ -32,13 +32,13 @@ commands: [README.md](./README.md).
32
32
  plexus-cli signing connection show --env staging --tenant <slug>
33
33
 
34
34
  # 2a. inSign. The password comes from stdin — NEVER as an argument.
35
- printf %s "$INSIGN_PASSWORD" | plexus-cli signing connection set --provider insign \
35
+ printf %s "$INSIGN_PASSWORD" | plexus-cli platform signing connection set --provider insign \
36
36
  --base-url https://insign.<anbieter>.de --username <api-user> --owner-id <owner> \
37
37
  --secret-stdin --env staging --tenant <slug>
38
38
 
39
39
  # 2b. DocuSign. The HMAC key from a file (or stdin); without one, no callback is
40
40
  # registered and the 15-minute poll is the only return path.
41
- plexus-cli signing connection set --provider docusign --user-id <GUID> \
41
+ plexus-cli platform signing connection set --provider docusign --user-id <GUID> \
42
42
  --redirect-to admin@plexus.swop.schule --secret-file ./hmac.txt \
43
43
  --env staging --tenant <slug>
44
44
 
@@ -47,7 +47,7 @@ plexus-cli signing connection set --provider docusign --user-id <GUID> \
47
47
  plexus-cli signing connection test --provider insign --env staging --tenant <slug>
48
48
 
49
49
  # 4. Make it the provider the school's contracts go out through.
50
- plexus-cli signing connection activate --provider insign --env staging --tenant <slug>
50
+ plexus-cli platform signing connection activate --provider insign --env staging --tenant <slug>
51
51
 
52
52
  # 5. Prove it.
53
53
  plexus-cli signing connection show --env staging --tenant <slug>
@@ -15,15 +15,15 @@ sealed under) must change — routine rotation or a suspected leak.
15
15
  envelopes under the old key open through the previous slot.
16
16
  2. Re-seal every connection under the new key:
17
17
  ```bash
18
- plexus-cli signing connection reseal --env <env>
18
+ plexus-cli platform signing connection reseal --env <env>
19
19
  ```
20
20
  3. Check the slots:
21
21
  ```bash
22
- plexus-cli signing status --env <env>
22
+ plexus-cli platform signing status --env <env>
23
23
  ```
24
24
 
25
25
  ## Verify
26
- `signing status` shows `sealedPrevious: 0`, `sealedUnknown: 0` and
26
+ `platform signing status` shows `sealedPrevious: 0`, `sealedUnknown: 0` and
27
27
  `previousSlot: nothing sealed under it — can be removed`. Then the platform
28
28
  operator clears the previous slot from the deployment's environment and deploys.
29
29
 
@@ -17,7 +17,7 @@ agent.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> users provision <email> \
20
+ plexus-cli --env <env> platform users provision <email> \
21
21
  --name "Vorname Nachname" --platform-admin \
22
22
  --out creds.csv --quiet
23
23
  ```
@@ -30,11 +30,11 @@ plexus-cli --env <env> users provision <email> \
30
30
 
31
31
  ## Verify
32
32
  ```bash
33
- plexus-cli --env <env> users show <email>
33
+ plexus-cli --env <env> platform users show <email>
34
34
  ```
35
35
 
36
36
  Success: a `platform: …` line lists the full `_platform.*` permission set and the
37
- user has **no** tenant rows. `plexus-cli --env <env> platform users` lists them too.
37
+ user has **no** tenant rows. `plexus-cli --env <env> platform users list` lists them too.
38
38
 
39
39
  ## Hand the credentials over
40
40
 
@@ -47,15 +47,15 @@ bare, one block per account. See
47
47
  - **Refuses an email that already has tenant access** (the `_platform.* XOR
48
48
  tenant-access` invariant). For a per-tenant account use
49
49
  [Add a tenant admin](./add-tenant-admin.md) instead.
50
- - Contrast `users create <email> --platform-admin`, which also mints a credential
50
+ - Contrast `platform users create <email> --platform-admin`, which also mints a credential
51
51
  (no verb leaves an identity that cannot log in) but takes **no display
52
- name** and never rotates an existing password. `users provision --platform-admin`
52
+ name** and never rotates an existing password. `platform users provision --platform-admin`
53
53
  is the named path, and re-running it deliberately resets the login.
54
54
  - Runtime-only account — **not** part of the demo seed (real personal passwords
55
55
  never are); a destructive reseed won't recreate it. Re-run if ever reseeded.
56
56
 
57
57
  ## Related
58
- - [Add a tenant admin](./add-tenant-admin.md) — the per-tenant twin (`users provision`).
59
- - Command reference: `plexus-cli users provision --help` and
60
- `plexus-cli users create --help` (the create-vs-provision distinction above).
58
+ - [Add a tenant admin](./add-tenant-admin.md) — the per-tenant twin (`platform users provision`).
59
+ - Command reference: `plexus-cli platform users provision --help` and
60
+ `plexus-cli platform users create --help` (the create-vs-provision distinction above).
61
61
  - Connection and token: `plexus-cli config show`, `plexus-cli whoami`.
@@ -17,7 +17,7 @@ explicit `_platform.*` permission set and a working login.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> users provision <email> \
20
+ plexus-cli --env <env> platform users provision <email> \
21
21
  --name "Vorname Nachname" \
22
22
  --permission _platform.schema.read \
23
23
  --out creds.csv --quiet
@@ -32,7 +32,7 @@ plexus-cli --env <env> users provision <email> \
32
32
 
33
33
  ## Verify
34
34
  ```bash
35
- plexus-cli --env <env> users show <email>
35
+ plexus-cli --env <env> platform users show <email>
36
36
  ```
37
37
 
38
38
  Success: a `platform: ...` line lists exactly the requested `_platform.*`
@@ -17,7 +17,7 @@ permission grant.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> --tenant <slug> users provision <email> \
20
+ plexus-cli --env <env> --tenant <slug> platform users provision <email> \
21
21
  --name "Vorname Nachname" --group tenant_admin \
22
22
  --out creds.csv --quiet
23
23
  ```
@@ -33,11 +33,11 @@ plexus-cli --env <env> --tenant <slug> users provision <email> \
33
33
 
34
34
  ## Verify
35
35
  ```bash
36
- plexus-cli --env <env> users show <email>
36
+ plexus-cli --env <env> platform users show <email>
37
37
  ```
38
38
 
39
39
  Success: the user lists the `<slug>` tenant with groups `tenant_admin, applicant`.
40
- (`users show` is a global lookup across every tenant the user belongs to — no
40
+ (`platform users show` is a global lookup across every tenant the user belongs to — no
41
41
  `--tenant` needed; the email match is case-insensitive.)
42
42
 
43
43
  ## Hand the credentials over — always this format
@@ -61,8 +61,8 @@ sequence, and the address never reaches the visible text.
61
61
  - The password is shown **once**; if you didn't capture it, re-run with `--out …`
62
62
  to mint a fresh one.
63
63
  - This both **grants tenant access and creates a login credential** — contrast
64
- `users grant` / `users set-group`, which only adjust access and group membership for
65
- a user who already exists. `users grant` REFUSES an unknown address (it
64
+ `platform users grant` / `tenant-users groups add`, which only adjust access and group membership for
65
+ a user who already exists. `platform users grant` REFUSES an unknown address (it
66
66
  has no name or password channel, so any identity it created could never log in);
67
67
  provision the account first, here.
68
68
  - The backend lowercases the email; the login address is the lowercased form.
@@ -71,6 +71,6 @@ sequence, and the address never reaches the visible text.
71
71
 
72
72
  ## Related
73
73
  - [Add a platform admin](./add-platform-admin.md) — the tenant-less platform twin
74
- (`users provision --platform-admin`).
74
+ (`platform users provision --platform-admin`).
75
75
  - Command reference: `plexus-cli users --help`.
76
76
  - Connection and token: `plexus-cli config show`, `plexus-cli whoami`.
@@ -6,17 +6,17 @@ reserved one (`test100@<domain>.test`) so no mail can ever reach a stranger.
6
6
 
7
7
  ## Prerequisites
8
8
  - A platform token with `_platform.users.manage` for the target env.
9
- - The account exists (`plexus-cli --env <env> users show <email>`).
9
+ - The account exists (`plexus-cli --env <env> platform users show <email>`).
10
10
  - The new address is free: the verb refuses one held by another account, in the
11
11
  plan already.
12
12
 
13
13
  ## Steps
14
14
  ```bash
15
15
  # 1. Plan — runs every check, writes nothing
16
- plexus-cli --env <env> users set-email <old@domain> --to <new@domain>
16
+ plexus-cli --env <env> platform users set-email <old@domain> --to <new@domain>
17
17
 
18
18
  # 2. Apply
19
- plexus-cli --env <env> users set-email <old@domain> --to <new@domain> --confirm
19
+ plexus-cli --env <env> platform users set-email <old@domain> --to <new@domain> --confirm
20
20
  ```
21
21
 
22
22
  For a test account, keep the local part and replace the domain's TLD with
@@ -25,8 +25,8 @@ For a test account, keep the local part and replace the domain's TLD with
25
25
 
26
26
  ## Verify
27
27
  ```bash
28
- plexus-cli --env <env> users show <new@domain> # same userId, same tenants
29
- plexus-cli --env <env> users show <old@domain> # → No user with email …
28
+ plexus-cli --env <env> platform users show <new@domain> # same userId, same tenants
29
+ plexus-cli --env <env> platform users show <old@domain> # → No user with email …
30
30
  ```
31
31
 
32
32
  ## Idempotency / gotchas
@@ -34,7 +34,7 @@ plexus-cli --env <env> users show <old@domain> # → No user with email …
34
34
  - One identity, every tenant: an account shared by several tenants moves in all
35
35
  of them at once. (Staff editing the party's E-Mail field cannot do this — that
36
36
  path refuses a shared identity and points here.)
37
- - The password is untouched; set one afterwards with `users set-password` if needed.
37
+ - The password is untouched; set one afterwards with `platform users set-password` if needed.
38
38
  - **Mailbox proof** is reset (the holder re-confirms via a mailed link before
39
39
  they can move a process again) — except for a reserved test address (`.test`,
40
40
  `.example`, `.invalid`, `.localhost`, `example.com/.net/.org`): no mailbox
@@ -32,7 +32,7 @@ change that takes the right away revokes the person's tokens.
32
32
  **0 — check the person is a `tenant_admin`:**
33
33
 
34
34
  ```bash
35
- plexus-cli --env <env> users show <email> # groups: tenant_admin, …
35
+ plexus-cli --env <env> platform users show <email> # groups: tenant_admin, …
36
36
  ```
37
37
 
38
38
  **A — the administrator mints it themselves:** in the app, *Einstellungen →
@@ -107,7 +107,7 @@ platform`, setup mode (Load N / wipe), `offer delete` (the hard delete).
107
107
  „Das API-Token „…“ wurde am <Datum> widerrufen: <Grund>“. A right that lapses without a
108
108
  write is still caught: every CLI call asks it and refuses with 403 „Ihr Konto hat
109
109
  das Recht „API-Tokens: Verwalten“ nicht mehr …“.
110
- - A tenant member cannot be made platform admin (`users set-platform-admin`):
110
+ - A tenant member cannot be made platform admin (`platform users set-platform-admin`):
111
111
  platform rights and tenant access exclude each other — an inactive access row
112
112
  counts too.
113
113
  - A unit-scoped membership does not count for config: the right must be held
@@ -9,8 +9,8 @@ create and rename but **not** delete.
9
9
  - A stray group ("Neue Berechtigungsgruppe") with no members.
10
10
  - A team that was retired and whose work has been re-pointed elsewhere.
11
11
 
12
- Not for: taking someone's access away — that is `users unset-group` (leave the
13
- group, keep the tenant) or `users revoke` (revoke tenant access).
12
+ Not for: taking someone's access away — that is `tenant-users groups revoke` (leave the
13
+ group, keep the tenant) or `platform users revoke` (revoke tenant access).
14
14
 
15
15
  ## Prerequisites
16
16
 
@@ -46,7 +46,7 @@ platform operator can confirm it in a `config export` (`foundation.permissionGro
46
46
 
47
47
  | Refusal | Meaning | Fix first |
48
48
  |---|---|---|
49
- | `has-members` | Someone is still in the group (the message names them) | `users unset-group` each |
49
+ | `has-members` | Someone is still in the group (the message names them) | `tenant-users groups revoke` each |
50
50
  | `owns-teams` | A running application binds this group as a work owner | Re-assign those applications |
51
51
  | `referenced-by-workflow` | A stored graph routes a decision/assign (or a not-yet-migrated legacy team-owner binding) to this key | Re-point the node, re-publish |
52
52
  | `structural` | It is `tenant_admin` | — (never deletable) |
@@ -15,14 +15,14 @@ so they can dogfood the product. One-time + manual: it grants the users that exi
15
15
  no `--tenant` needed). `plexus-cli --env <env> tenants` lists the reachable slugs.
16
16
  - **Auth:** a platform-admin token with `_platform.users.manage`. Confirm with
17
17
  `plexus-cli --env <env> whoami`.
18
- - **Tooling:** an installed `plexus-cli` (`plexus-cli users grant-all --help`).
18
+ - **Tooling:** an installed `plexus-cli` (`plexus-cli platform users grant-all --help`).
19
19
 
20
20
  ## Steps
21
21
  Run once per **source** tenant, pointing every one at the target (`test`):
22
22
  ```bash
23
23
  # Repeat for each non-test tenant slug. Without --confirm it only prints the plan:
24
- plexus-cli --env <env> users grant-all --from <sourceSlug> --to test --group tenant_admin
25
- plexus-cli --env <env> users grant-all --from <sourceSlug> --to test --group tenant_admin --confirm
24
+ plexus-cli --env <env> platform users grant-all --from <sourceSlug> --to test --group tenant_admin
25
+ plexus-cli --env <env> platform users grant-all --from <sourceSlug> --to test --group tenant_admin --confirm
26
26
  ```
27
27
 
28
28
  To enumerate the source slugs to loop over:
@@ -41,7 +41,7 @@ plexus-cli --env <env> tenants # list slugs; run grant-all for each b
41
41
 
42
42
  ## Verify
43
43
  ```bash
44
- plexus-cli --env <env> users show <someEmailFromSource>
44
+ plexus-cli --env <env> platform users show <someEmailFromSource>
45
45
  ```
46
46
 
47
47
  Success: the user now lists the `test` tenant with group `tenant_admin, applicant`.
@@ -51,10 +51,10 @@ The command output also prints `Granted N/M users …` plus any `skipped` rows.
51
51
  - **Current users only** — there is no standing auto-grant; re-run to enroll users
52
52
  added after the last run.
53
53
  - Re-running is safe (idempotent per user); it neither rotates passwords nor creates
54
- logins (contrast `users provision`).
54
+ logins (contrast `platform users provision`).
55
55
  - Runtime-only grants — a destructive reseed of the source/target tenant drops them;
56
56
  re-run this playbook afterwards.
57
57
 
58
58
  ## Related
59
59
  - [Add a tenant admin](./add-tenant-admin.md) — single ready-to-log-in account.
60
- - Command reference: `plexus-cli users grant-all --help`.
60
+ - Command reference: `plexus-cli platform users grant-all --help`.
@@ -8,16 +8,16 @@ explicitly to the platform's real triage admins only.
8
8
  ## Prerequisites
9
9
  - `--env staging|prod` configured with a platform-operator token (the grant is gated
10
10
  `_platform.users.manage`).
11
- - The target already exists as a platform admin (`plexus-cli --env <env> platform users`).
11
+ - The target already exists as a platform admin (`plexus-cli --env <env> platform users list`).
12
12
 
13
13
  ## Steps
14
14
  ```bash
15
- plexus-cli --env <env> users set-platform-permission <email> \
15
+ plexus-cli --env <env> platform users set-platform-permission <email> \
16
16
  --permission _platform.feedback.assign --on
17
17
  ```
18
18
  Example — grant one triage admin on prod:
19
19
  ```bash
20
- plexus-cli --env prod users set-platform-permission --allow-prod ada@example.com \
20
+ plexus-cli --env prod platform users set-platform-permission --allow-prod ada@example.com \
21
21
  --permission _platform.feedback.assign --on
22
22
  ```
23
23
 
@@ -29,7 +29,7 @@ plexus-cli --env <env> feedback admins
29
29
 
30
30
  ## Idempotency / gotchas
31
31
  - **Opt-in, not part of the full-admin grant.** Making someone a full platform admin
32
- (`users set-platform-admin … --on`) does **not** grant assignability; this perm is
32
+ (`platform users set-platform-admin … --on`) does **not** grant assignability; this perm is
33
33
  excluded from the default set on purpose. Re-affirming full-admin status *preserves*
34
34
  an already-granted assign perm (it is never silently stripped).
35
35
  - Revoke with `--off`. Removing the last permission from a row deletes the
@@ -60,7 +60,7 @@ plexus-cli --env <env> --tenant <slug> tenant-users reactivate <email>
60
60
  ```
61
61
 
62
62
  A deactivated person gets their groups back at once; an archived one starts
63
- without groups — assign them in the app (needs `administration.permissions.manage`).
63
+ without groups — give them with step 8 (needs `administration.permissions.manage`).
64
64
 
65
65
  **4 — invite a new person.** Without `--confirm` the command only prints whom it
66
66
  would invite, in which group and unit; with it, the account and the access are
@@ -115,10 +115,27 @@ plexus-cli --env <env> --tenant <slug> tenant-users signature request <email>
115
115
 
116
116
  Only the person can store, replace or remove their own signature.
117
117
 
118
+ **8 — give or take a permission group** (needs `administration.permissions.manage`
119
+ as well — tenant-wide for a group without `--unit`, for that unit with it):
120
+
121
+ ```bash
122
+ plexus-cli --env <env> --tenant <slug> tenant-users groups add <email> --group <key> [--unit <unit-key>]
123
+ plexus-cli --env <env> --tenant <slug> tenant-users groups revoke <email> --group <key> [--unit <unit-key>]
124
+ plexus-cli --env <env> --tenant <slug> tenant-users groups revoke <email> --group <key> --successor <colleague-email> --confirm
125
+ ```
126
+
127
+ `groups revoke` plans unless `--confirm`. If it takes the person's last staff
128
+ group they leave the staff: refused while a responsibility rule names them, and
129
+ their open applications and tasks need `--successor` (the plan of
130
+ `tenant-users deactivate <email>` lists what would move and who may take over).
131
+
132
+ **9 — give them a config key** — the handle responsibility rules and the
133
+ configuration name them by: [Give a staff member a config key](./set-staff-config-key.md).
134
+
118
135
  ## Verify
119
136
 
120
137
  ```bash
121
- plexus-cli --env <env> --tenant <slug> tenant-users show <email> # status, groups, signature yes/no
138
+ plexus-cli --env <env> --tenant <slug> tenant-users show <email> # status, groups, key, signature yes/no
122
139
  plexus-cli --env <env> --tenant <slug> tenant-users history <email> # one Verlauf row per change
123
140
  ```
124
141