@smartkomm/plexus-cli 0.1.109 → 0.1.110
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
|
-
|
|
1
|
+
6a69afcdad9d14294e3eab37068741725a536fc660ed5f1050776419cd90153d
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -225,6 +225,7 @@ whole is the operator's (ask them; do not try).
|
|
|
225
225
|
| [offer/workflow-default-channels.md](references/offer/workflow-default-channels.md) | Mandant | Fixed team chat channels for every application of an offer. |
|
|
226
226
|
| [persons/import-persons-from-csv.md](references/persons/import-persons-from-csv.md) | Mandant | Import pupils, their guardians and class enrollments from a person list (CSV + mapping file). |
|
|
227
227
|
| [persons/purge-deleted-person.md](references/persons/purge-deleted-person.md) | Plattform | Delete a soft-deleted person for good. |
|
|
228
|
+
| [platform/clear-test-residue.md](references/platform/clear-test-residue.md) | Plattform | Find and delete what deleted test applications left in a real tenant, after review. |
|
|
228
229
|
| [platform/rename-tenant.md](references/platform/rename-tenant.md) | Plattform | Change a tenant's slug and display name in place, then its accounts' addresses. |
|
|
229
230
|
| [platform/inventory.md](references/platform/inventory.md) | Plattform | Count test data per real tenant and stored files (referenced, orphaned) — counts and ids only. |
|
|
230
231
|
| [platform/sweep-storage-orphans.md](references/platform/sweep-storage-orphans.md) | Plattform | List the stored files no record names, then delete exactly the reviewed ones. |
|
|
@@ -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
|
-
|
|
4
|
+
295 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 (offline)](#admission-offline) (1)
|
|
@@ -31,7 +31,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
31
31
|
- [Organisation (school token)](#organisation-school-token) (8)
|
|
32
32
|
- [Persons (platform operator)](#persons-platform-operator) (1)
|
|
33
33
|
- [Persons (school token)](#persons-school-token) (2)
|
|
34
|
-
- [Platform (platform operator)](#platform-platform-operator) (
|
|
34
|
+
- [Platform (platform operator)](#platform-platform-operator) (13)
|
|
35
35
|
- [Setup (platform operator)](#setup-platform-operator) (5)
|
|
36
36
|
- [Signing (platform operator)](#signing-platform-operator) (5)
|
|
37
37
|
- [Signing (school token)](#signing-school-token) (8)
|
|
@@ -3172,6 +3172,32 @@ Change a tenant's slug and name in place (plan unless --confirm)
|
|
|
3172
3172
|
| `--name <value>` (required) | The new display name. |
|
|
3173
3173
|
| `--confirm` | Write the change (without it, only the plan is printed). |
|
|
3174
3174
|
|
|
3175
|
+
### `platform test-residue apply`
|
|
3176
|
+
|
|
3177
|
+
Delete the residue of deleted test applications that BOTH a fresh plan and --list name (dry run unless --confirm). What only one side names is reported and stays.
|
|
3178
|
+
|
|
3179
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3180
|
+
- **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
|
|
3181
|
+
|
|
3182
|
+
| Option | Description |
|
|
3183
|
+
|---|---|
|
|
3184
|
+
| `--list <value>` (required) | The plan file `platform test-residue plan --out` wrote, reviewed. |
|
|
3185
|
+
| `--protect <value>` (required) | JSON file with the application ids that must never be touched (the demo applications a school keeps); required, non-empty — a planned row naming one aborts the run. |
|
|
3186
|
+
| `--confirm` | Delete (without it, only the comparison is printed). |
|
|
3187
|
+
|
|
3188
|
+
### `platform test-residue plan`
|
|
3189
|
+
|
|
3190
|
+
Read-only: the residue of deleted test applications in one tenant — ids and counts per table, never names.
|
|
3191
|
+
|
|
3192
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3193
|
+
- **Effect:** read — changes nothing on the deployment
|
|
3194
|
+
|
|
3195
|
+
| Option | Description |
|
|
3196
|
+
|---|---|
|
|
3197
|
+
| `--protect <value>` (required) | JSON file with the application ids that must never be touched (the demo applications a school keeps); required, non-empty — a planned row naming one aborts the run. |
|
|
3198
|
+
| `--out <value>` | Write the plan as JSON here (refused when it exists, unless --force) — the list `apply` takes. |
|
|
3199
|
+
| `--force` | Overwrite an existing --out file. |
|
|
3200
|
+
|
|
3175
3201
|
### `platform workers list`
|
|
3176
3202
|
|
|
3177
3203
|
List live job workers (platform-admin)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Clear the residue of deleted test applications
|
|
2
|
+
|
|
3
|
+
**When to use:** test applications in a real tenant were deleted, but what they
|
|
4
|
+
produced stayed — contracts (often signed), generation runs, signing requests,
|
|
5
|
+
the persons they created and the stored PDFs. This verb finds that residue by
|
|
6
|
+
one rule and deletes it after review. Never in the `test` tenant (the deploy
|
|
7
|
+
resets it) or `_platform`.
|
|
8
|
+
|
|
9
|
+
## What counts (the plan's categories)
|
|
10
|
+
|
|
11
|
+
| | Deleted because | Never because |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **L1** contracts, generation runs, signing requests | the application they name was deleted (a contract: every one of its runs names a deleted application) — with their snapshots, signatures, parties, lines, allocations, events and signing documents | a name, the tenant or an age; a row that never named an application stays (unclear) |
|
|
14
|
+
| **L2** persons | they are a party or signer of an L1 contract | — |
|
|
15
|
+
| **L3** persons | their first and last name occur at least twice in the tenant | the name alone: see the exclusion |
|
|
16
|
+
| **L4** files | only L1 rows name them — reported; the release follows the deleted rows, not the list | a file another row names too stays (`shared`) |
|
|
17
|
+
|
|
18
|
+
**Excluded** (L2 and L3): an import record, a user account, a lead, a live
|
|
19
|
+
application that wrote the person, a contract outside L1, a party shared by two
|
|
20
|
+
persons. **Unclear:** a person whose deletion would reach a row outside its own
|
|
21
|
+
data (another table still names it), or an L1 root another row holds — listed,
|
|
22
|
+
never deleted.
|
|
23
|
+
|
|
24
|
+
**Abort:** plan and apply stop before any write when a planned row names an id
|
|
25
|
+
from `--protect` (the demo applications a school keeps) or a live application.
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
- A platform token with `_platform.config.manage` (`_platform.config.read` is enough for `plan`).
|
|
29
|
+
- `protect.json`: a JSON array of the application ids that must stay, non-empty.
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
```bash
|
|
33
|
+
# 1. Plan — ids and counts only, no names; the file is the list apply takes
|
|
34
|
+
plexus-cli --env <env> --tenant <slug> platform test-residue plan --protect protect.json --out plan.json
|
|
35
|
+
|
|
36
|
+
# 2. Review plan.json; remove every id that must stay (persons under persons.l2 / persons.l3,
|
|
37
|
+
# contracts under l1.contracts). Removing is the only edit; `files` is a report, not a list.
|
|
38
|
+
|
|
39
|
+
# 3. Dry run — re-plans and prints, per category, what both sides name and what only one does
|
|
40
|
+
plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.json --protect protect.json
|
|
41
|
+
|
|
42
|
+
# 4. Delete the intersection (--allow-prod only on prod)
|
|
43
|
+
plexus-cli --env <env> --tenant <slug> platform test-residue apply --list plan.json --protect protect.json --confirm --allow-prod
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Verify
|
|
47
|
+
```bash
|
|
48
|
+
plexus-cli --env <env> --tenant <slug> platform test-residue plan --protect protect.json
|
|
49
|
+
# every L1 and L4 count is 0; L2/L3 hold only what step 2 removed from the list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Idempotency / gotchas
|
|
53
|
+
- The apply never trusts the file: it computes the plan again and deletes only
|
|
54
|
+
what both name. An id only the file names (gone meanwhile, or now held) and an
|
|
55
|
+
id only the fresh plan names (new residue) are both reported under `diff` and
|
|
56
|
+
stay — plan again and review to take them.
|
|
57
|
+
- The unit of the list is the root: a contract in the list goes with its whole
|
|
58
|
+
closure (snapshots, signatures, …). Its files are not released by this verb:
|
|
59
|
+
each deleted row's holder trigger schedules the release, so a file
|
|
60
|
+
goes once its last holder is gone — removing it from `files` keeps nothing.
|
|
61
|
+
- A person is asked again right before its delete; one that is excluded by then
|
|
62
|
+
is reported under `skippedPersons`.
|
|
63
|
+
- A file another row still names (a retained setup export's pin included) is
|
|
64
|
+
kept by the release (`held`); the plan counts it under `sharedFiles`.
|
|
65
|
+
- Running it twice is harmless: the second plan is empty.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
- [Rename a tenant](./rename-tenant.md)
|