@numericoach/gskills-admin-cli 0.1.28 → 0.1.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@numericoach/gskills-admin-cli",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin-only CLI for GSkills super-admin operations.",
@@ -55,7 +55,7 @@ gskills-admin pages list --take 100 --output jsonl
55
55
  4. Dry-run writes first.
56
56
 
57
57
  ```bash
58
- gskills-admin pages create --data '{"name":"Draft","slug":"draft","language":"fr"}' --dry-run --output json
58
+ gskills-admin pages create --data '{"name":"Draft","slug":"draft","language":"fr","disabled":true,"archived":false}' --dry-run --output json
59
59
  gskills-admin pages update <id> --data '{"disabled":false}' --dry-run --output json
60
60
  gskills-admin pages create --data-file ./page.json --dry-run --output json
61
61
  ```
@@ -70,7 +70,7 @@ gskills-admin cache invalidate --instance <instanceId> --scope pages --dry-run -
70
70
  gskills-admin cache invalidate --instance <instanceId> --scope pages --yes --output json
71
71
  ```
72
72
 
73
- CRUD help exposes `cache.scopes` for resources that are known to feed deploy caches. After create, update, or soft-delete, the database can be correct while the end-user view is still stale. Use the narrowest listed scope first. Use `all` only when the changed setting affects many deploy surfaces or when the narrow scope did not clear the visible stale state.
73
+ CRUD help exposes `cache.scopes` for resources that are known to feed deploy caches. After create, update, or delete, the database can be correct while the end-user view is still stale. Use the narrowest listed scope first. Use `all` only when the changed setting affects many deploy surfaces or when the narrow scope did not clear the visible stale state.
74
74
 
75
75
  Generic `create` and `update` require `--dry-run` or `--yes`. Use `--data-file` for large JSON payloads. Do not ask agents to inline full EditorJS content in shell strings.
76
76
 
@@ -105,6 +105,28 @@ The block helpers read the full page content, find nested blocks by id, generate
105
105
 
106
106
  `pages content-schema` is the machine-readable source of truth for supported EditorJS/GSkills blocks, nested child-block paths, immutable reference fields and examples. Agents should call it before generating or patching page content.
107
107
 
108
+ Content governance and page comments use the same data and write paths as the super-admin governance UI:
109
+
110
+ ```bash
111
+ gskills-admin governance list --instance global --output json
112
+ gskills-admin governance get <entryId> --instance global --output json
113
+ gskills-admin governance comments-board --instance global --mine --output json
114
+ gskills-admin governance open-comment-count --instance global --output json
115
+ gskills-admin governance search --instance global --query Gmail --output json
116
+ gskills-admin governance create-task --entity-type page --entity-id <pageId> --status CHANGES_REQUESTED --task-title "Relire la page" --dry-run --output json
117
+ gskills-admin governance upsert --entity-type page --entity-id <pageId> --status TO_REVIEW --dry-run --output json
118
+ gskills-admin governance update-task <entryId> --task-description-file ./details.md --dry-run --output json
119
+ gskills-admin governance set-assignees <entryId> --user-ids <userId,userId> --dry-run --output json
120
+ gskills-admin governance set-instance <entryId> --target-instance <instanceId> --dry-run --output json
121
+ gskills-admin governance comments add <entryId> --content-file ./comment.md --dry-run --output json
122
+ gskills-admin page-comments list <pageId> --output json
123
+ gskills-admin page-comments add <pageId> --content-file ./comment.md --block-id <blockId> --create-task --dry-run --output json
124
+ gskills-admin page-comments reply <parentCommentId> --content-file ./reply.md --dry-run --output json
125
+ gskills-admin page-comments resolve <commentId> --dry-run --output json
126
+ ```
127
+
128
+ Governance and page-comment writes require `--dry-run` or `--yes`. Task deletion also requires `--force --confirm-delete governance:<entryId>`.
129
+
108
130
  Internal knowledge and resources support direct local file uploads through signed GCS URLs. The CLI gets a signed URL from the authenticated app API, streams the local file directly to storage, then writes the normal row with the returned URL. This avoids routing large videos through a Next.js API body.
109
131
 
110
132
  ```bash
@@ -116,7 +138,21 @@ gskills-admin resources update <resourceId> --instance dev-numericoach --upload-
116
138
 
117
139
  Use `--mime-type` when the extension is ambiguous and `--upload-name` when the stored file name should differ from the local basename. Always pass `--instance` for client-specific content; otherwise content-like creates default to `global`.
118
140
 
119
- Delete commands are soft-only. They require both `--force` and an exact confirmation token, then write the safest inactive field available, such as `disabled: true`, `archived: true`, `isActive: false`, or `active: false`. If a resource cannot be safely disabled, the CLI refuses the delete command.
141
+ Learning path icons support the same sources as the super-admin editor:
142
+
143
+ ```bash
144
+ gskills-admin learning-paths icons --query Gmail --output json
145
+ gskills-admin learning-paths set-icon <learningPathId> --app Gmail --dry-run --output json
146
+ gskills-admin learning-paths set-icon <learningPathId> --upload-file ./icon.png --instance dev-numericoach --dry-run --output json
147
+ gskills-admin learning-paths generate-icon <learningPathId> --prompt "flat central handshake, transparent background" --dry-run --output json
148
+ gskills-admin learning-paths generate-icon <learningPathId> --prompt-file ./icon-prompt.txt --yes --output json
149
+ ```
150
+
151
+ `icons` reads only French global category app icons. `set-icon --upload-file` streams the local image through the signed upload path and writes `LearningPath.iconUrl`. `generate-icon` calls the same server-side image generator used by the editor, including the same prompt and post-processing.
152
+
153
+ Do not pass `--use-app-icon` unless the user explicitly asks for the app logo to appear. It is off by default because most parcours icons should be symbolic. Repeating app logos across every learning path gets visually heavy and often produces cluttered, low-quality icons.
154
+
155
+ Delete commands are soft-only. They require both `--force` and an exact confirmation token, then write the safest inactive field available, preferring `archived: true` when the resource supports it and otherwise falling back to fields such as `disabled: true`, `isActive: false`, or `active: false`. If a resource cannot be safely disabled, the CLI refuses the delete command. After a real delete, re-read the row and verify the inactive field was written.
120
156
 
121
157
  ```bash
122
158
  gskills-admin pages delete <id> --force --confirm-delete pages:<id> --dry-run --output json
@@ -223,6 +259,8 @@ Rules:
223
259
 
224
260
  If `--instance` is omitted, content-like resources default to `instanceId = "global"`.
225
261
 
262
+ On `global`, `disabled: true` means draft for newly created content. The CLI create path defaults to `disabled: true` on global resources that support it unless the payload explicitly says otherwise. On client instances, `disabled: true` means hidden or disabled.
263
+
226
264
  This applies to:
227
265
 
228
266
  - `pages`
@@ -755,8 +793,8 @@ Prefer the narrowest scope:
755
793
  ## Safety
756
794
 
757
795
  - Prefer `list` and `get` before writes
758
- - Use `--dry-run` before create, update, soft-delete, and sync
759
- - Use `--force --confirm-delete <resource>:<id>` only for soft-deletes the user explicitly requested
796
+ - Use `--dry-run` before create, update, delete, and sync
797
+ - Use `--force --confirm-delete <resource>:<id>` only for archive/delete flows the user explicitly requested
760
798
  - Use `sync diff` before `sync run --yes`
761
799
  - Use cache `--dry-run` before cache `--yes`
762
800
  - Re-read changed rows after writes