@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.
- package/README.md +33 -40
- package/dist/cli.mjs +261 -420
- package/dist/skill/.managed-by-plexus-cli +1 -1
- package/dist/skill/SKILL.md +2 -1
- package/dist/skill/references/commands.md +22 -98
- package/dist/skill/references/config/wipe-tenant-config.md +1 -22
- package/dist/skill/references/notifications/mail-level.md +6 -3
- package/dist/skill/references/offer/add-workflow-node.md +5 -5
- package/dist/skill/references/offer/author-manifest-meta.md +18 -46
- package/dist/skill/references/offer/author-smartform.md +3 -6
- package/dist/skill/references/offer/completeness-check.md +1 -1
- package/dist/skill/references/offer/create-pedagogy-unit.md +1 -1
- package/dist/skill/references/offer/edit-live-tenant-offer.md +5 -5
- package/dist/skill/references/offer/upgrade-bundle.md +106 -0
- package/dist/spec.snapshot.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,7 +200,8 @@ This table names each group and the rules its `--help` does not carry.
|
|
|
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. |
|
|
203
|
-
| **offer
|
|
203
|
+
| **offer upgrade** | `offer upgrade --dir <bundle> [--semantic <node>.<outcome>=<meaning>]… [--waitlist-policy <node>=<order>:<bool>]… [--payee <node>=<key>]… [--answers <file>] [--write [--out <dir>]]` — rewrite a bundle exported in an older format into the current one, offline; dry run by default, refuses what it would have to guess (see ["Declarative config-as-code"](#declarative-config-as-code-bundles-for-promotion)). |
|
|
204
|
+
| **offer manifest** | `offer manifest set --sort-order` (offline bundle authoring). manifest.json carries no key (`{}`) — every retired key, `selection` included (the queue policy is the waitlist node's inputs `waitlistOrder` / `autoPromoteOnVacancy`), is refused by `offer validate` with the line to delete. |
|
|
204
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). |
|
|
205
206
|
| **config · setup · files · branding** | Tenant config-as-code — see ["Tenant config-as-code"](#tenant-config-as-code-config-command-group). |
|
|
206
207
|
|
|
@@ -800,11 +801,38 @@ and those come from the seed (`app/config/templates/test/**`), not from a bundle
|
|
|
800
801
|
```
|
|
801
802
|
offers/<tenant>/<offerSlug>/
|
|
802
803
|
bundle.yaml # index — module, tenant, slugs, label, links, program, pinned
|
|
803
|
-
manifest.json #
|
|
804
|
-
|
|
805
|
-
workflow.json # OPTIONAL — { graph, progressWiring } (absent for a draft offer)
|
|
804
|
+
manifest.json # {} — no key any more (every former key is refused by name)
|
|
805
|
+
smartforms/<slug>.json # OPTIONAL — { label, ...definition } (absent for a draft offer)
|
|
806
|
+
workflow.json # OPTIONAL — { graph, progressLayout?, progressWiring? } == saveWorkflowDraft (absent for a draft offer)
|
|
806
807
|
```
|
|
807
808
|
|
|
809
|
+
A key the format no longer has (manifest `capacity`/`roleInstances`/`progressLayout`/…,
|
|
810
|
+
graph `id`/`label`/`dataFlow`, wiring `layoutId`, form `id`/`outcomeIds`) is refused by
|
|
811
|
+
`offer validate` and `apply` with the line to delete — never dropped silently.
|
|
812
|
+
|
|
813
|
+
**A bundle exported in an older format** (manifest keys, `outcomeFnRef`, outcomes without
|
|
814
|
+
a `semantic`, a start node with its own outcomes, a waitlist without its policy inputs,
|
|
815
|
+
assignment slots as text, …) is refused by `validate` / `plan` / `apply` as a whole
|
|
816
|
+
(`BUNDLE_NEEDS_UPGRADE`) and upgraded once, offline, with `offer upgrade`:
|
|
817
|
+
|
|
818
|
+
```bash
|
|
819
|
+
plexus-cli offer upgrade --dir ./old # dry run: every change, every question
|
|
820
|
+
plexus-cli offer upgrade --dir ./old \
|
|
821
|
+
--semantic <node>.<outcome>=<granted|rejected|waitlisted|other> \
|
|
822
|
+
--waitlist-policy <node>=<arrival|manual>:<true|false> \
|
|
823
|
+
--payee <node>=<Träger key> \
|
|
824
|
+
--write --out ./new # a full copy; without --out: in place
|
|
825
|
+
plexus-cli offer validate --dir ./new
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
Nothing is guessed: where the old format left a value to a default (an outcome id with no
|
|
829
|
+
known meaning, a waitlist without a stated policy, an online payment without a payee) the
|
|
830
|
+
node is refused with the values it may take, and nothing is written while a refusal is
|
|
831
|
+
open. The same answers fit a JSON file (`--answers <file>`: `{ semantics, waitlistPolicy,
|
|
832
|
+
payee }`). A read no slot declares, a task with a fixed person and no team, or a start
|
|
833
|
+
node with foreign outcomes is a hand edit. Recipe:
|
|
834
|
+
[Upgrade an old bundle](./playbooks/offer/upgrade-bundle.md).
|
|
835
|
+
|
|
808
836
|
```bash
|
|
809
837
|
plexus-cli offer export --tenant test --offer grundschule-havelland --out offers/test/gymnasium
|
|
810
838
|
# the PUBLISHED generation (live head, else the staged candidate); --draft exports the draft.
|
|
@@ -913,7 +941,7 @@ plexus-cli config legal-entity add --file <config.json> --key <k> --name <n> --t
|
|
|
913
941
|
[--parent <k>] [--street --hausnr --plz --ort] # offline: add a Träger to an export
|
|
914
942
|
plexus-cli config unit add --file <config.json> --key <k> --name <de> --name-en <en> --legal-entity <k> --kind <kind> \
|
|
915
943
|
[--slug <s>] [--parent <k>] [--pedagogy-unit] # offline: add a unit to an export
|
|
916
|
-
plexus-cli --env <env> config wipe --tenant <slug> --target <id|
|
|
944
|
+
plexus-cli --env <env> config wipe --tenant <slug> --target <id|all> [--cascade] [--confirm] [--allow-destructive] [--json]
|
|
917
945
|
```
|
|
918
946
|
|
|
919
947
|
Assignment rules are **not** a tenant config target: the rule is part of each offer's
|
|
@@ -1053,41 +1081,6 @@ dependent live data unless `--cascade`. `--target all` is the teardown: it purge
|
|
|
1053
1081
|
drains every target, then deletes the tenant row. Every wipe deletes the stored files only its rows
|
|
1054
1082
|
held (the logo stays: sent mail links it). See [`playbooks/config/wipe-tenant-config.md`](./playbooks/config/wipe-tenant-config.md).
|
|
1055
1083
|
|
|
1056
|
-
**Narrow targets** are slices of a target for a schema rollout. They are reached only
|
|
1057
|
-
when named — never by `--target all`, never in `config targets` — take no `--cascade`, and have
|
|
1058
|
-
no heavy tier:
|
|
1059
|
-
|
|
1060
|
-
| Target | Clears | Leaves |
|
|
1061
|
-
|---|---|---|
|
|
1062
|
-
| `applications-without-finance` | every table of `applications` except the finance runtime tables; the draft party shells the applications created; each application row with its activities and letters | contracts, lines, revisions, signatures, Vorgänge, invoices, payments, postings, the contract setup, master data. A finance row's link to an application is unset (`contract_generation_runs.applicationId (unset, row kept)`); a link inside immutable evidence is reported (`… (row kept, still names a deleted artifacts row)`). Blocked while a discard, a signing process or a Stripe payment of an application is still open |
|
|
1063
|
-
| `offer-definitions` | `workflow_definitions`, `smart_form_definitions`, `offer_versions` | programs, stages, runs, document templates — so neither the contract setup nor a lead blocks it. Blocked while any application, form instance or artifact still exists (run `applications-without-finance` first); `offer apply --publish` recreates the definitions |
|
|
1064
|
-
| `upload-tickets` | the tenant's open upload tickets (`issued`, `pending`) with their unbound objects, by `tenantSlug` — the orphan sweep's rule without its age: a pending upload something still references is settled instead. Refuses on a ticket that predates the upload tickets (no stager) or one whose object is also a consumed claim | every consumed row (the ownership claim of a referenced object) and its object; an open ticket without `tenantSlug` (none is written today) |
|
|
1065
|
-
|
|
1066
|
-
Consumed upload rows are not cleared but migrated (operator migration, platform-wide, run AFTER
|
|
1067
|
-
`upload-tickets` — a pending upload it settles is written with `consumedAt` again):
|
|
1068
|
-
`npx convex run migrations:run '{"fn":"migrations:consumedUploadsToClaimShape"}'`, preflight
|
|
1069
|
-
`npx convex run migrations:consumedUploadsToClaimShapePreflight '{"cursor":null}'` (page with
|
|
1070
|
-
`continueCursor` until `isDone`). It strips `createdAt`, `consumedAt`, `stagedBy` and a
|
|
1071
|
-
`smartFormInstanceId` whose form is gone (that row is marked `orphaned` — never `shared`; no
|
|
1072
|
-
sweep, deletion or teardown takes its object or its row, and deleting orphaned files is a
|
|
1073
|
-
separate step the maintainer approves; a row already `shared` stays shared). The preflight's
|
|
1074
|
-
`willMarkOrphaned` counts the rows a run will mark, `orphans` sizes every orphaned row per page —
|
|
1075
|
-
`rows`, `bytes` (per claim), `objectMissing`, `byTenant` and `bySurface` (sum over the pages).
|
|
1076
|
-
An orphaned file also survives a tenant wipe and an application's erasure (logged as an error
|
|
1077
|
-
by `deleteStoredObject`). A claim whose form still exists KEEPS `smartFormInstanceId` (`liveFormOwner` in the
|
|
1078
|
-
preflight) — the running release deletes a form's files by it, so run it after
|
|
1079
|
-
`applications-without-finance` on every tenant. No row and no object is deleted. Rows consumed
|
|
1080
|
-
after a run carry the columns again (every writer still sets them): re-run right before the
|
|
1081
|
-
deploy with `'{"fn":"migrations:consumedUploadsToClaimShape","reset":true}'` and check the
|
|
1082
|
-
preflight once more.
|
|
1083
|
-
|
|
1084
|
-
```bash
|
|
1085
|
-
plexus-cli --env <env> config wipe --tenant <slug> --target applications-without-finance # dry run
|
|
1086
|
-
plexus-cli --env <env> config wipe --tenant <slug> --target applications-without-finance --confirm # prod: + --allow-prod
|
|
1087
|
-
plexus-cli --env <env> config wipe --tenant <slug> --target offer-definitions [--confirm]
|
|
1088
|
-
plexus-cli --env <env> config wipe --tenant <slug> --target upload-tickets [--confirm]
|
|
1089
|
-
```
|
|
1090
|
-
|
|
1091
1084
|
### Pre-production model changes
|
|
1092
1085
|
|
|
1093
1086
|
Use the [reset and native seed policy](../../../docs/engineering/contract-model-reset.md). There is no migration command. Config apply changes values in the current schema.
|