@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.
- package/README.md +50 -24
- package/dist/cli.mjs +1382 -1023
- package/dist/skill/.managed-by-plexus-cli +1 -1
- package/dist/skill/SKILL.md +26 -16
- package/dist/skill/references/audit/answer-access-request.md +2 -2
- package/dist/skill/references/commands.md +1072 -742
- package/dist/skill/references/config/init-tenant.md +4 -4
- package/dist/skill/references/config/platform-setup-export.md +2 -2
- package/dist/skill/references/notifications/debug-mail-delivery.md +8 -8
- package/dist/skill/references/notifications/reword-a-letter.md +2 -2
- package/dist/skill/references/notifications/trace-a-login.md +2 -2
- package/dist/skill/references/offer/assignment-rule.md +5 -5
- package/dist/skill/references/offer/task-result-files.md +1 -1
- package/dist/skill/references/persons/purge-deleted-person.md +2 -2
- package/dist/skill/references/resolver/register-input-keys.md +7 -7
- package/dist/skill/references/retention/erase-due-parties.md +3 -3
- package/dist/skill/references/signing/connect-a-school.md +3 -3
- package/dist/skill/references/signing/rotate-the-key.md +3 -3
- package/dist/skill/references/users/add-platform-admin.md +8 -8
- package/dist/skill/references/users/add-platform-user.md +2 -2
- package/dist/skill/references/users/add-tenant-admin.md +6 -6
- package/dist/skill/references/users/change-login-email.md +6 -6
- package/dist/skill/references/users/cli-access-for-tenant-admin.md +2 -2
- package/dist/skill/references/users/delete-permission-group.md +3 -3
- package/dist/skill/references/users/grant-cross-tenant-access.md +6 -6
- package/dist/skill/references/users/grant-feedback-assignable.md +4 -4
- package/dist/skill/references/users/manage-school-users.md +19 -2
- package/dist/skill/references/users/set-password.md +10 -10
- package/dist/skill/references/users/set-staff-config-key.md +70 -0
- package/dist/skill/references/users/use-test-account.md +2 -2
- package/dist/skill/references/worker-ops/debug-worker-jobs.md +7 -7
- package/dist/spec.snapshot.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -187,16 +187,16 @@ This table names each group and the rules its `--help` does not carry.
|
|
|
187
187
|
| **retention** | Applications and persons past their retention period, erased by hand only (`--confirm --expect <n>`); nothing erases on a schedule — [erase-due-applications](./playbooks/retention/erase-due-applications.md), [erase-due-parties](./playbooks/retention/erase-due-parties.md). |
|
|
188
188
|
| **test-actions** | The test-mode popover of a test application (scenarios, `auto-fill-files`, `submit-form`, …); `--param` values are JSON like `call`'s — [drive-a-test-application](./playbooks/test-actions/drive-a-test-application.md). |
|
|
189
189
|
| **tokens** | Minting needs `_platform.apiTokens.manage` or the tenant right `administration.apiTokens.manage` (every `tenant_admin` holds it); list and revoke your own always work. Minting FOR someone needs `_platform.users.manage` and `_platform.apiTokens.manage` — [cli-access-for-tenant-admin](./playbooks/users/cli-access-for-tenant-admin.md). |
|
|
190
|
-
| **users** | `
|
|
191
|
-
| **tenant-users** | A school's own user administration (*Administration → Nutzer*), reachable with a school's token (`administration.users.manage`): `list`, `show`, `history`, `deactivate` / `archive` (plan with the handover unless `--confirm`; `--successor` takes the open work), `reactivate`, `invite` (plan unless `--confirm`; always mails a one-time sign-in link, `--group` by key needs `administration.permissions.manage` too), `send-login-link`, `send-password-reset`, `notifications list\|set`, `signature request`. A person is named by address or account id, never by name. Separate from `users`, the platform's cross-tenant group (`users archive` ends access in every school), because `--tenant` is filled by `default_tenant` and cannot tell „this school" from „everywhere" — [manage-school-users](./playbooks/users/manage-school-users.md). |
|
|
192
|
-
| **platform** | `platform users`, `platform
|
|
193
|
-
| **persons · leads** | Person search; `persons purge` is the only hard delete of a person (plan unless `--confirm`) — [purge-deleted-person](./playbooks/persons/purge-deleted-person.md); a tenant's open leads (Interessenten) — [list-leads](./playbooks/leads/list-leads.md). |
|
|
190
|
+
| **users** | A school's permission groups and memberships, with the school's token: `users groups`, `users groups delete`; a membership is given and taken with `tenant-users groups add\|revoke` (`users set-group` / `users unset-group` are retired spellings; removing is refused while a `wip` or published workflow's assignment rule names the person — replace them first: „Person ersetzen" in the workflow editor, then publish; `--replace-with <configKey>` hands their active applications over and never rewrites a rule). Every other user command is the platform's — `platform users …` below. |
|
|
191
|
+
| **tenant-users** | A school's own user administration (*Administration → Nutzer*), reachable with a school's token (`administration.users.manage`): `list`, `show`, `history`, `deactivate` / `archive` (plan with the handover unless `--confirm`; `--successor` takes the open work), `reactivate`, `invite` (plan unless `--confirm`; always mails a one-time sign-in link, `--group` by key needs `administration.permissions.manage` too), `set-key` (the config key rules and config name the person by; plan unless `--confirm`; `invite --key` too — [set-staff-config-key](./playbooks/users/set-staff-config-key.md)), `groups add\|revoke` (by group and unit key, needs `administration.permissions.manage`; `revoke` plans unless `--confirm`; `users set-group` / `users unset-group` are retired spellings), `send-login-link`, `send-password-reset`, `notifications list\|set`, `signature request`. A person is named by address or account id, never by name. Separate from `users`, the platform's cross-tenant group (`platform users archive` ends access in every school), because `--tenant` is filled by `default_tenant` and cannot tell „this school" from „everywhere" — [manage-school-users](./playbooks/users/manage-school-users.md). |
|
|
192
|
+
| **platform** | Everything only a platform operator may do — see ["Platform vs school commands"](#platform-vs-school-commands): `platform users …` (every account across tenants: `list`, `show`, `grant`, `grant-all`, `revoke` — the `--tenant` only —, `archive` everywhere, `provision`, `create`, `set-password`, `set-email`, `set-platform-admin`, `set-platform-permission`, `doctor`, `relink-auth`, `login-trail`; a password comes only through `--password-stdin` / `--password-file`, `--out <csv>` appends the credential row, see ["Provisioning admins"](#provisioning-admins)), `platform workers list\|logs\|reaper-status\|reap`, `platform notifications list\|show\|retry\|sweeper-status\|self-test` (the delivery monitor), `platform imports trigger-all\|cleanup-orphaned`, `platform persons purge`, `platform signing connection set\|activate\|reseal\|delete` and `platform signing status`, `platform generator input-key …` — [debug-worker-jobs](./playbooks/worker-ops/debug-worker-jobs.md). |
|
|
193
|
+
| **persons · leads** | Person search; `platform persons purge` is the only hard delete of a person (plan unless `--confirm`) — [purge-deleted-person](./playbooks/persons/purge-deleted-person.md); a tenant's open leads (Interessenten) — [list-leads](./playbooks/leads/list-leads.md). |
|
|
194
194
|
| **admission** | `admission runs list`; `assignment simulate` evaluates an offer bundle's assignment rule offline — [assignment-rule](./playbooks/offer/assignment-rule.md). |
|
|
195
195
|
| **generator** | `generator list`, `generator scope` (unit and declared Träger of a template), the platform-wide input registry (`generator input-key …`, no tenant) and contract packages from one file (`generator package plan\|apply --file`: unreviewed scenario outputs are written into the file, the next run seals). Authoring one generator revision (source, scenarios, seal) happens in the web workspace — [manage-contract-resolver](./playbooks/resolver/manage-contract-resolver.md), [manage-contract-package](./playbooks/resolver/manage-contract-package.md). |
|
|
196
196
|
| **imports** | `trigger` / `trigger-all` print the plan and start nothing unless `--confirm` (`--probe --confirm` starts test jobs); the Engage password comes via `--engage-password-stdin`, `--engage-password-file` or `PLEXUS_ENGAGE_PASSWORD`, never as an argument. |
|
|
197
197
|
| **feedback** | The feedback board: file, assign, tag, reply, status, deadline, links, GitHub issues — [create-and-triage-feedback](./playbooks/feedback/create-and-triage-feedback.md), [work-a-feedback-item](./playbooks/feedback/work-a-feedback-item.md), [manage-feedback-tags](./playbooks/feedback/manage-feedback-tags.md). |
|
|
198
198
|
| **demo** | Personalised links to the public demo video page and their statistics (a visit counts once the page was visible 5 s or the visitor interacted; `%` = how much the best single visit played). Needs `_platform.demoLinks.manage` — [demo-video-links](./playbooks/marketing/demo-video-links.md). |
|
|
199
|
-
| **notifications** |
|
|
199
|
+
| **notifications** | The school's wording (`notifications letters …`, `notifications chrome …`) — see ["The words a school sends"](#the-words-a-school-sends-notifications-letters--chrome); why a sign-in failed: [trace-a-login](./playbooks/notifications/trace-a-login.md). |
|
|
200
200
|
| **offer** | Imperative offer CRUD (`archive` is the reversible take-down, `delete` the hard delete, plan unless `--confirm`) and declarative bundles (`export`, `validate`, `plan`, `diff`, `apply`) — see ["Offer / admission CRUD"](#offer--admission-crud). |
|
|
201
201
|
| **offer form** | Offline SmartForm authoring; every mutator runs the real publish-gate validators before writing. Every text is ONE `{ de, en }` field: a German text needs its English in the same call (`--label-en`, …) — the German is never copied into `en`. A fieldMap `to` names the tenant's custom-field key directly — [author-smartform](./playbooks/offer/author-smartform.md), [edit-smartform](./playbooks/offer/edit-smartform.md). |
|
|
202
202
|
| **offer workflow** | Offline workflow-graph authoring. Every `node` verb names its node with `--node <id>`; every flag that reads another node's data takes a full ADDRESS (see ["Addresses"](#addresses-what-a-node-reads-and-who-produces-it)); `node delete` is refused while an address elsewhere names the node; the `governedDocument` node cannot be added by the CLI yet (author it in bundle JSON, gate it through `offer validate`). Sections below: countersignature, staff inputs and the if node, readiness reads, completeness check, tasks, notifications, contract generator. |
|
|
@@ -205,6 +205,32 @@ This table names each group and the rules its `--help` does not carry.
|
|
|
205
205
|
| **signing · stripe** | E-signature connection per school (see ["E-signature"](#e-signature-signing-command-group)); Stripe Connect — [connect-a-school](./playbooks/stripe/connect-a-school.md). |
|
|
206
206
|
| **config · setup · files · branding** | Tenant config-as-code — see ["Tenant config-as-code"](#tenant-config-as-code-config-command-group). |
|
|
207
207
|
|
|
208
|
+
### Platform vs school commands
|
|
209
|
+
|
|
210
|
+
Every command declares the right it needs, in ONE table, `plexus/commandScope.ts`,
|
|
211
|
+
and `--help` and the [command reference](./skill/references/commands.md) show it in
|
|
212
|
+
the category (`Users (platform operator)`, `Offer (school token)`) and as a
|
|
213
|
+
**Right:** line:
|
|
214
|
+
|
|
215
|
+
| Scope | Who runs it | Where it lives |
|
|
216
|
+
|---|---|---|
|
|
217
|
+
| **platform operator** | a token with a `_platform.*` right; a school's token is refused | `platform …`, or a group that is the operator's as a whole: `feedback`, `demo`, `setup`, `retention`, `jobs`, `audit`, `branding` |
|
|
218
|
+
| **school token** | a module permission inside one school — the school's own administrator (`--tenant <slug>`) | every other group: `offer`, `applications`, `config`, `tenant-users`, `users groups\|set-group\|unset-group`, `notifications letters\|chrome`, `org`, `catalog`, `generator` (not `input-key`), `stripe`, `signing list\|start\|show\|void\|resend\|reconcile`, `signing connection show\|test`, … |
|
|
219
|
+
| **own account** | any signed-in token | `whoami`, `tenants`, `tokens …`, `call` (the called function's own gate decides) |
|
|
220
|
+
| **offline** | no deployment | `functions`, `describe`, `offer validate`, the bundle editors |
|
|
221
|
+
|
|
222
|
+
So the path tells a school administrator whether a command is theirs: nothing
|
|
223
|
+
under `platform …` is, and no other group mixes the two — except `files`
|
|
224
|
+
(`files list` is the school's; `files put|delete` reach only the platform's
|
|
225
|
+
functions — a school adds files through `config apply` or the app). Two
|
|
226
|
+
commands have a platform branch behind a flag: `tokens create --for <email>`
|
|
227
|
+
and `accounts email-changes --user <address>`. `commandScope.test.ts` holds this:
|
|
228
|
+
it reads the `gate:` of every backend function a command calls, and fails when
|
|
229
|
+
a command calling a platform-only function is not `platform`, when a command
|
|
230
|
+
lacks a scope, or when a group mixes platform and school commands.
|
|
231
|
+
|
|
232
|
+
The retired paths of the commands that moved under `platform …` (`users grant`, `workers reap`, `notifications list`, `imports trigger-all`, `persons purge`, `signing connection set`, `generator input-key create`, …) still run, hidden, and name their replacement on stderr.
|
|
233
|
+
|
|
208
234
|
**Writing commands name their environment.** Every command declares its effect in ONE
|
|
209
235
|
table, `plexus/writeVerbs.ts` (read · write · write only with `--confirm` · `call` by its
|
|
210
236
|
kind · local-write for the offline bundle/config editors), plus whether it runs only on
|
|
@@ -292,7 +318,7 @@ except where marked **break**:
|
|
|
292
318
|
|
|
293
319
|
| Old | New |
|
|
294
320
|
|---|---|
|
|
295
|
-
| `stammdaten persons [purge]` | `persons list`, `persons purge` |
|
|
321
|
+
| `stammdaten persons [purge]` | `persons list`, `platform persons purge` |
|
|
296
322
|
| `interessenten list` | `leads list` |
|
|
297
323
|
| `admission laeufe` | `admission runs list` |
|
|
298
324
|
| `offer leistung add\|rm` | `offer service add\|delete` |
|
|
@@ -301,50 +327,50 @@ except where marked **break**:
|
|
|
301
327
|
| `offer level remove` / `rename` | `offer level archive` / `set` |
|
|
302
328
|
| `offer form … rm`, `offer role rm`, `offer workflow … rm\|remove` | `… delete` |
|
|
303
329
|
| `files rm\|remove` | `files delete` (plan unless `--confirm`) |
|
|
304
|
-
| `signing connection remove` | `signing connection delete` |
|
|
330
|
+
| `signing connection remove` | `platform signing connection delete` |
|
|
305
331
|
| `org unit\|legal-entity update` | `org unit\|legal-entity set` |
|
|
306
332
|
| `feedback deadline` | `feedback set-deadline` |
|
|
307
333
|
| `feedback tags rename\|recolor\|visibility` | `feedback tags set --name\|--color\|--visibility` |
|
|
308
|
-
| `users add` | `users grant` |
|
|
309
|
-
| `users remove` | `users revoke` (the `--tenant`; plan unless `--confirm`) |
|
|
310
|
-
| `users delete`, `users deactivate` | `users archive` (plan unless `--confirm`) |
|
|
311
|
-
| `users provision-platform-admin` | `users provision --platform-admin` |
|
|
312
|
-
| `users provision-platform-user` | `users provision --permission …` |
|
|
334
|
+
| `users add` | `platform users grant` |
|
|
335
|
+
| `users remove` | `platform users revoke` (the `--tenant`; plan unless `--confirm`) |
|
|
336
|
+
| `users delete`, `users deactivate` | `platform users archive` (plan unless `--confirm`) |
|
|
337
|
+
| `users provision-platform-admin` | `platform users provision --platform-admin` |
|
|
338
|
+
| `users provision-platform-user` | `platform users provision --permission …` |
|
|
313
339
|
| `--slug` (offer commands) | `--offer` |
|
|
314
340
|
| `--output` | `--out` |
|
|
315
|
-
| `imports trigger-all --execute` | `imports trigger-all --confirm` |
|
|
341
|
+
| `platform imports trigger-all --execute` | `platform imports trigger-all --confirm` |
|
|
316
342
|
| `imports trigger --dry-run` | the default plan; `--probe --confirm` runs the importer without committing |
|
|
317
343
|
| `imports trigger --confirm <key>` | `imports trigger --confirm` — **break**: the typed key is gone (on production `--allow-prod` is the second key); the old form fails as an extra argument |
|
|
318
344
|
| `--password <pw>`, `--engage-password <pw>` | **break**, refused: `--password-stdin` / `--password-file`, `--engage-password-stdin` / `--engage-password-file` / `PLEXUS_ENGAGE_PASSWORD` |
|
|
319
345
|
|
|
320
346
|
Newly plan-by-default (scripts that ran them must add `--confirm`): `files delete`,
|
|
321
|
-
`signing connection delete`, `signing void`, `offer delete`, `users archive`,
|
|
322
|
-
`users revoke`, `users grant-all`, `org unit delete`, `org legal-entity delete`,
|
|
347
|
+
`platform signing connection delete`, `signing void`, `offer delete`, `platform users archive`,
|
|
348
|
+
`platform users revoke`, `platform users grant-all`, `org unit delete`, `org legal-entity delete`,
|
|
323
349
|
`generator delete-draft`, `generator package delete-draft`, `jobs cancel`,
|
|
324
350
|
`tokens revoke`, `demo link revoke`, `feedback tags delete`, `imports trigger`,
|
|
325
|
-
`imports trigger-all`.
|
|
351
|
+
`platform imports trigger-all`.
|
|
326
352
|
|
|
327
353
|
### Provisioning admins
|
|
328
354
|
|
|
329
|
-
`users doctor` lists every identity that cannot log in, with the repair each one needs, and
|
|
355
|
+
`platform users doctor` lists every identity that cannot log in, with the repair each one needs, and
|
|
330
356
|
exits non-zero when it finds any — run it after provisioning.
|
|
331
357
|
|
|
332
358
|
Two distinct shapes for a tenant-less platform operator:
|
|
333
359
|
|
|
334
|
-
- `users create <email> --platform-admin` — mints the identity + the `_platform.*`
|
|
360
|
+
- `platform users create <email> --platform-admin` — mints the identity + the `_platform.*`
|
|
335
361
|
row **with** a generated credential (printed once; `--out` appends the
|
|
336
362
|
`email,password` row to a CSV). It takes no display name, so the account carries
|
|
337
363
|
none. No verb produces an identity that cannot log in.
|
|
338
|
-
- `users provision <email> --name "…" --platform-admin` — the **credentialed,
|
|
364
|
+
- `platform users provision <email> --name "…" --platform-admin` — the **credentialed,
|
|
339
365
|
ready-to-log-in** full-admin path (creates the Better Auth credential too and
|
|
340
366
|
grants every `_platform.*` permission).
|
|
341
|
-
- `users provision <email> --name "…" --permission _platform.schema.read`
|
|
367
|
+
- `platform users provision <email> --name "…" --permission _platform.schema.read`
|
|
342
368
|
— the credentialed limited-platform path. It creates the Better Auth credential
|
|
343
369
|
and grants exactly the repeated `--permission` values.
|
|
344
370
|
|
|
345
371
|
Both platform provisioning forms need `_platform.users.manage` (your own
|
|
346
372
|
platform-admin token, no Convex admin key) and refuse an email that already has
|
|
347
|
-
tenant access (the `_platform.* XOR tenant-access` invariant). `users provision` does
|
|
373
|
+
tenant access (the `_platform.* XOR tenant-access` invariant). `platform users provision` does
|
|
348
374
|
the same credentialed onboarding for a *tenant* user (`--tenant <slug> --group
|
|
349
375
|
tenant_admin`).
|
|
350
376
|
|
|
@@ -361,7 +387,7 @@ common CLI task, see [playbooks/](./playbooks/README.md).
|
|
|
361
387
|
`finanzen_vertraege.contracts.manage`. `start` goes out through the tenant's ACTIVE
|
|
362
388
|
connection — there is no provider to pick.
|
|
363
389
|
|
|
364
|
-
`plexus-cli signing connection {show,test
|
|
390
|
+
`plexus-cli signing connection {show,test}`, `plexus-cli platform signing connection {set,activate,delete,reseal}` (`delete` plans unless `--confirm`) and `plexus-cli platform signing status` (key slots: what is sealed under which key; `reseal` after a key rotation, both platform-wide under `_platform.config.manage` — docs/signing/operations.md → "Rotating the key") — the school's own
|
|
365
391
|
account at a provider (`signingConnections.*`). `show` and `test` need
|
|
366
392
|
`finanzen_vertraege.contracts.manage`; `set`, `activate` and `remove` the platform right
|
|
367
393
|
`_platform.config.manage`. A secret (DocuSign's Connect HMAC key, inSign's API password)
|
|
@@ -986,7 +1012,7 @@ refused (both printed, nothing overwritten), and the edited file must pass the s
|
|
|
986
1012
|
the server keeps only the hash. So `apply --confirm` on such a tenant is not safe to run
|
|
987
1013
|
in a shared terminal or a pasted log unless you redirect them:
|
|
988
1014
|
- `--out <file>` — append each `email,password` to that CSV (header written when the
|
|
989
|
-
file is new/empty). Same flag, same format, same append semantics as `users provision`.
|
|
1015
|
+
file is new/empty). Same flag, same format, same append semantics as `platform users provision`.
|
|
990
1016
|
- `--quiet` — keep the plaintext off stdout (the row then reads `password: (not echoed)`);
|
|
991
1017
|
use it **with** `--out`, or the password is gone.
|
|
992
1018
|
- A **dry run mints nothing**: the flags are inert there, and `--out` neither creates
|
|
@@ -1000,7 +1026,7 @@ refused (both printed, nothing overwritten), and the edited file must pass the s
|
|
|
1000
1026
|
|
|
1001
1027
|
JSON shape: `{ tenant, dryRun, counts: {created,updated,unchanged,deleted}, orphans: [{target,table,key,id}], deletions: [{target,key}], updates: [{target,key}], slugChanges: [{unitKey,from,to}], accounts: {created, minted: [{email,password}], pending: [email]}, destroyed? }`.
|
|
1002
1028
|
Note that `--json` prints `accounts.minted` verbatim — `--quiet` governs the table only,
|
|
1003
|
-
exactly as on `users provision`.
|
|
1029
|
+
exactly as on `platform users provision`.
|
|
1004
1030
|
|
|
1005
1031
|
### `set` — surgical edit
|
|
1006
1032
|
`--target` is a setField locator (`display-groups`, `fields`, `lists`, `roles`, `units`,
|