@numericoach/gskills-admin-cli 0.1.7 → 0.1.9
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 +13 -2
- package/dist/gskills-admin.js +55 -23
- package/package.json +1 -1
- package/skills/gskills-access-entity-ops/SKILL.md +106 -90
- package/skills/gskills-admin-cli/SKILL.md +56 -0
- package/skills/gskills-content-sync-cache-ops/SKILL.md +119 -79
- package/skills/gskills-customer-playbooks/SKILL.md +180 -0
- package/skills/gskills-feedback-db-ops/SKILL.md +105 -108
- package/skills/gskills-ops-db-audit/SKILL.md +88 -114
- package/skills/gskills-vocabulary/SKILL.md +97 -0
package/README.md
CHANGED
|
@@ -38,6 +38,15 @@ gskills-admin cache invalidate --instance <instanceId> --scope pages --languages
|
|
|
38
38
|
gskills-admin cache invalidate --instance <instanceId> --scope menu-bundle --yes --output json
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
CRUD help includes cache hints for resources that can leave deploy views stale after a raw write:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
gskills-admin pages help --output json
|
|
45
|
+
gskills-admin topics help --output json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Use the listed `cache.scopes` with `gskills-admin cache invalidate` after create, update, or delete when the end-user view must reflect the change immediately.
|
|
49
|
+
|
|
41
50
|
Operational helpers are available for the admin-only flows agents should not improvise:
|
|
42
51
|
|
|
43
52
|
```bash
|
|
@@ -53,14 +62,16 @@ gskills-admin ambassadors label --instance <instanceId> --language fr --output j
|
|
|
53
62
|
|
|
54
63
|
Feedback reply bodies are file-based on purpose. Production replies are multi-line, and `send-reply` rejects inline body text to avoid shell parsing surprises.
|
|
55
64
|
|
|
56
|
-
Raw project and analytics data can be read through resources such as `project-data`, `ticket-sla-rules`, `analytics`, `quiz-attempts`, `user-paths`, `chromebook-progress`, and `user-learning-
|
|
65
|
+
Raw project and analytics data can be read or adjusted through resources such as `project-data`, `ticket-sla-rules`, `analytics`, `quiz-attempts`, `user-paths`, `chromebook-progress`, `user-badges`, `user-learning-paths`, and `user-learning-path-item-completions`.
|
|
57
66
|
|
|
58
67
|
## Agent skill
|
|
59
68
|
|
|
60
|
-
Install the bundled skills so AI agents know the auth model, resource map, output modes, sync workflow, content-authoring standards,
|
|
69
|
+
Install the bundled skills so AI agents know the auth model, resource map, output modes, sync workflow, content-authoring standards, recurring DB-backed ops runbooks, GSkills vocabulary, and recurring customer playbooks.
|
|
61
70
|
|
|
62
71
|
```bash
|
|
63
72
|
gskills-admin skills install --target ~/.codex/skills
|
|
73
|
+
gskills-admin skills install --name gskills-vocabulary --target ~/.codex/skills
|
|
74
|
+
gskills-admin skills install --name gskills-customer-playbooks --target ~/.codex/skills
|
|
64
75
|
gskills-admin skills install --name gskills-feedback-db-ops --target ~/.codex/skills
|
|
65
76
|
```
|
|
66
77
|
|
package/dist/gskills-admin.js
CHANGED
|
@@ -334,7 +334,8 @@ var resources = [
|
|
|
334
334
|
aliases: ["page", "content"],
|
|
335
335
|
defaultFields: ["id", "name", "slug", "language", "instanceId", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
336
336
|
syncable: true,
|
|
337
|
-
dangerousDelete: true
|
|
337
|
+
dangerousDelete: true,
|
|
338
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
338
339
|
},
|
|
339
340
|
{
|
|
340
341
|
name: "topics",
|
|
@@ -343,7 +344,8 @@ var resources = [
|
|
|
343
344
|
aliases: ["topic", "applications", "category-apps", "categories", "thematics", "thematic"],
|
|
344
345
|
defaultFields: ["id", "name", "slug", "language", "instanceId", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
345
346
|
syncable: true,
|
|
346
|
-
dangerousDelete: true
|
|
347
|
+
dangerousDelete: true,
|
|
348
|
+
cacheScopes: ["applications", "pages", "pages-knowledge"]
|
|
347
349
|
},
|
|
348
350
|
{
|
|
349
351
|
name: "resources",
|
|
@@ -352,7 +354,8 @@ var resources = [
|
|
|
352
354
|
aliases: ["resource", "ebooks", "e-books", "webinars", "magazines"],
|
|
353
355
|
defaultFields: ["id", "title", "type", "language", "instanceId", "isActive", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
354
356
|
syncable: true,
|
|
355
|
-
dangerousDelete: true
|
|
357
|
+
dangerousDelete: true,
|
|
358
|
+
cacheScopes: ["pages-knowledge"]
|
|
356
359
|
},
|
|
357
360
|
{
|
|
358
361
|
name: "internal-knowledge",
|
|
@@ -361,7 +364,8 @@ var resources = [
|
|
|
361
364
|
aliases: ["knowledge", "knowledges"],
|
|
362
365
|
defaultFields: ["id", "title", "language", "instanceId", "isActive", "isAIAllowed", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
363
366
|
syncable: true,
|
|
364
|
-
dangerousDelete: true
|
|
367
|
+
dangerousDelete: true,
|
|
368
|
+
cacheScopes: ["pages-knowledge"]
|
|
365
369
|
},
|
|
366
370
|
{
|
|
367
371
|
name: "learning-paths",
|
|
@@ -370,7 +374,8 @@ var resources = [
|
|
|
370
374
|
aliases: ["learning-path", "paths", "path"],
|
|
371
375
|
defaultFields: ["id", "name", "slug", "language", "instanceId", "isActive", "mandatory", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
372
376
|
syncable: true,
|
|
373
|
-
dangerousDelete: true
|
|
377
|
+
dangerousDelete: true,
|
|
378
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
374
379
|
},
|
|
375
380
|
{
|
|
376
381
|
name: "changelogs",
|
|
@@ -387,7 +392,8 @@ var resources = [
|
|
|
387
392
|
aliases: ["chromebook", "chromebook-game", "chromebook-exercise", "chromebook-games"],
|
|
388
393
|
defaultFields: ["id", "title", "language", "instanceId", "type", "order", "isActive", "parentId", "sourceExerciseId", "updatedAt"],
|
|
389
394
|
instanceField: "instanceId",
|
|
390
|
-
dangerousDelete: true
|
|
395
|
+
dangerousDelete: true,
|
|
396
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
391
397
|
},
|
|
392
398
|
{
|
|
393
399
|
name: "chromebook-steps",
|
|
@@ -396,7 +402,8 @@ var resources = [
|
|
|
396
402
|
aliases: ["chromebook-step", "chromebook-exercise-steps"],
|
|
397
403
|
defaultFields: ["id", "exerciseId", "stepNumber", "title", "language", "contentType", "order", "updatedAt"],
|
|
398
404
|
instanceField: null,
|
|
399
|
-
dangerousDelete: true
|
|
405
|
+
dangerousDelete: true,
|
|
406
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
400
407
|
},
|
|
401
408
|
{
|
|
402
409
|
name: "project-data",
|
|
@@ -438,7 +445,8 @@ var resources = [
|
|
|
438
445
|
label: "Instances",
|
|
439
446
|
aliases: ["instance"],
|
|
440
447
|
defaultFields: ["id", "name", "URL", "licenceType", "alphaProgramKeys", "createdAt", "updatedAt"],
|
|
441
|
-
dangerousDelete: true
|
|
448
|
+
dangerousDelete: true,
|
|
449
|
+
cacheScopes: ["all"]
|
|
442
450
|
},
|
|
443
451
|
{
|
|
444
452
|
name: "alpha-programs",
|
|
@@ -454,7 +462,8 @@ var resources = [
|
|
|
454
462
|
aliases: ["quiz"],
|
|
455
463
|
defaultFields: ["id", "title", "language", "instanceId", "mandatory", "isActive", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
456
464
|
syncable: true,
|
|
457
|
-
dangerousDelete: true
|
|
465
|
+
dangerousDelete: true,
|
|
466
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
458
467
|
},
|
|
459
468
|
{
|
|
460
469
|
name: "badges",
|
|
@@ -463,7 +472,8 @@ var resources = [
|
|
|
463
472
|
aliases: ["badge"],
|
|
464
473
|
defaultFields: ["id", "name", "language", "instanceId", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
465
474
|
syncable: true,
|
|
466
|
-
dangerousDelete: true
|
|
475
|
+
dangerousDelete: true,
|
|
476
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
467
477
|
},
|
|
468
478
|
{
|
|
469
479
|
name: "feedbacks",
|
|
@@ -505,7 +515,8 @@ var resources = [
|
|
|
505
515
|
aliases: ["ambassador", "champions", "champion", "experts", "expert"],
|
|
506
516
|
defaultFields: ["id", "userId", "active", "descriptionAmbassador", "contactContent", "createdOn"],
|
|
507
517
|
instanceField: null,
|
|
508
|
-
dangerousDelete: true
|
|
518
|
+
dangerousDelete: true,
|
|
519
|
+
cacheScopes: ["pages"]
|
|
509
520
|
},
|
|
510
521
|
{
|
|
511
522
|
name: "tags",
|
|
@@ -514,7 +525,8 @@ var resources = [
|
|
|
514
525
|
aliases: ["tag"],
|
|
515
526
|
defaultFields: ["id", "name", "normalizedName", "color", "scope", "ownerInstanceId", "createdAt", "updatedAt"],
|
|
516
527
|
instanceField: "ownerInstanceId",
|
|
517
|
-
dangerousDelete: true
|
|
528
|
+
dangerousDelete: true,
|
|
529
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
518
530
|
},
|
|
519
531
|
{
|
|
520
532
|
name: "tag-assignments",
|
|
@@ -522,7 +534,8 @@ var resources = [
|
|
|
522
534
|
label: "Tag assignments",
|
|
523
535
|
aliases: ["tag-assignment"],
|
|
524
536
|
defaultFields: ["id", "tagId", "instanceId", "entityType", "entityId", "createdAt", "updatedAt"],
|
|
525
|
-
dangerousDelete: true
|
|
537
|
+
dangerousDelete: true,
|
|
538
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
526
539
|
},
|
|
527
540
|
{
|
|
528
541
|
name: "menus",
|
|
@@ -531,7 +544,8 @@ var resources = [
|
|
|
531
544
|
aliases: ["menu", "menu-items"],
|
|
532
545
|
defaultFields: ["id", "name", "url", "pageId", "parentId", "instanceId", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
533
546
|
syncable: true,
|
|
534
|
-
dangerousDelete: true
|
|
547
|
+
dangerousDelete: true,
|
|
548
|
+
cacheScopes: ["menu-bundle"]
|
|
535
549
|
},
|
|
536
550
|
{
|
|
537
551
|
name: "menu-sections",
|
|
@@ -540,7 +554,8 @@ var resources = [
|
|
|
540
554
|
aliases: ["menu-instances"],
|
|
541
555
|
defaultFields: ["id", "name", "order", "instanceId", "disabled", "archived", "alphaProgramIds"],
|
|
542
556
|
syncable: true,
|
|
543
|
-
dangerousDelete: true
|
|
557
|
+
dangerousDelete: true,
|
|
558
|
+
cacheScopes: ["menu-bundle"]
|
|
544
559
|
},
|
|
545
560
|
{
|
|
546
561
|
name: "workflows",
|
|
@@ -549,14 +564,16 @@ var resources = [
|
|
|
549
564
|
aliases: ["workflow"],
|
|
550
565
|
defaultFields: ["id", "name", "triggerType", "isActive", "instanceId", "disabled", "archived", "alphaProgramIds", "updatedAt"],
|
|
551
566
|
syncable: true,
|
|
552
|
-
dangerousDelete: true
|
|
567
|
+
dangerousDelete: true,
|
|
568
|
+
cacheScopes: ["pages", "pages-knowledge"]
|
|
553
569
|
},
|
|
554
570
|
{
|
|
555
571
|
name: "feature-flags",
|
|
556
572
|
delegate: "featureFlagAssignment",
|
|
557
573
|
label: "Feature flags",
|
|
558
574
|
aliases: ["feature-flag", "flags"],
|
|
559
|
-
defaultFields: ["id", "featureKey", "targetType", "targetId", "active", "variant", "updatedAt"]
|
|
575
|
+
defaultFields: ["id", "featureKey", "targetType", "targetId", "active", "variant", "updatedAt"],
|
|
576
|
+
cacheScopes: ["all"]
|
|
560
577
|
},
|
|
561
578
|
{
|
|
562
579
|
name: "groups",
|
|
@@ -564,7 +581,8 @@ var resources = [
|
|
|
564
581
|
label: "Manual groups",
|
|
565
582
|
aliases: ["group", "manual-groups", "manual-group"],
|
|
566
583
|
defaultFields: ["id", "name", "description", "instanceId", "isRevert", "createdAt", "updatedAt"],
|
|
567
|
-
dangerousDelete: true
|
|
584
|
+
dangerousDelete: true,
|
|
585
|
+
cacheScopes: ["menu-bundle"]
|
|
568
586
|
},
|
|
569
587
|
{
|
|
570
588
|
name: "org-units",
|
|
@@ -572,7 +590,8 @@ var resources = [
|
|
|
572
590
|
label: "Org units",
|
|
573
591
|
aliases: ["org-unit", "ou", "ous"],
|
|
574
592
|
defaultFields: ["id", "name", "code", "type", "googleOuId", "parentId", "instanceId", "instanceCountryParentId", "createdAt", "updatedAt"],
|
|
575
|
-
dangerousDelete: true
|
|
593
|
+
dangerousDelete: true,
|
|
594
|
+
cacheScopes: ["menu-bundle"]
|
|
576
595
|
},
|
|
577
596
|
{
|
|
578
597
|
name: "user-org-units",
|
|
@@ -581,7 +600,8 @@ var resources = [
|
|
|
581
600
|
aliases: ["user-org-unit", "ou-memberships"],
|
|
582
601
|
defaultFields: ["userId", "orgUnitId", "primary", "assignedAt"],
|
|
583
602
|
instanceField: null,
|
|
584
|
-
dangerousDelete: true
|
|
603
|
+
dangerousDelete: true,
|
|
604
|
+
cacheScopes: ["menu-bundle"]
|
|
585
605
|
},
|
|
586
606
|
{
|
|
587
607
|
name: "ou-admin-scopes",
|
|
@@ -598,7 +618,8 @@ var resources = [
|
|
|
598
618
|
label: "Entity restriction rules",
|
|
599
619
|
aliases: ["entity-rules", "content-restriction-rules", "restrictions"],
|
|
600
620
|
defaultFields: ["id", "instanceId", "entityId", "restrictionMode", "categoryIds", "learningPathRestrictionMode", "learningPathIds", "alphaAllPrograms", "alphaProgramIds", "updatedAt"],
|
|
601
|
-
dangerousDelete: true
|
|
621
|
+
dangerousDelete: true,
|
|
622
|
+
cacheScopes: ["menu-bundle", "pages", "pages-knowledge", "applications"]
|
|
602
623
|
},
|
|
603
624
|
{
|
|
604
625
|
name: "users",
|
|
@@ -615,7 +636,8 @@ var resources = [
|
|
|
615
636
|
aliases: ["access-pass", "passes"],
|
|
616
637
|
defaultFields: ["id", "userId", "type", "startAt", "expireAt", "givenAt", "createdAt", "updatedAt"],
|
|
617
638
|
instanceField: "user.instanceID",
|
|
618
|
-
dangerousDelete: true
|
|
639
|
+
dangerousDelete: true,
|
|
640
|
+
cacheScopes: ["menu-bundle"]
|
|
619
641
|
},
|
|
620
642
|
{
|
|
621
643
|
name: "analytics",
|
|
@@ -687,6 +709,7 @@ var resourceHelpRows = () => resources.map((resource) => ({
|
|
|
687
709
|
resource: resource.name,
|
|
688
710
|
db: resource.delegate,
|
|
689
711
|
sync: resource.syncable ? "yes" : "no",
|
|
712
|
+
cacheScopes: resource.cacheScopes?.join(", ") || "",
|
|
690
713
|
aliases: resource.aliases.join(", ")
|
|
691
714
|
}));
|
|
692
715
|
// ../../src/cli/commands.ts
|
|
@@ -1469,7 +1492,9 @@ var schemaHelp = () => ({
|
|
|
1469
1492
|
name: resource.name,
|
|
1470
1493
|
aliases: resource.aliases,
|
|
1471
1494
|
defaultFields: resource.defaultFields,
|
|
1472
|
-
syncable: Boolean(resource.syncable)
|
|
1495
|
+
syncable: Boolean(resource.syncable),
|
|
1496
|
+
cacheScopes: resource.cacheScopes ?? [],
|
|
1497
|
+
cacheNote: resource.cacheScopes?.length ? "After create/update/delete, visible deploy content may stay stale until these cache scopes are invalidated." : "No deploy-cache scope is listed for this raw resource. Still verify visible product state after writes."
|
|
1473
1498
|
}))
|
|
1474
1499
|
});
|
|
1475
1500
|
var authHelp = () => ({
|
|
@@ -1484,6 +1509,8 @@ var skillsHelp = () => ({
|
|
|
1484
1509
|
usage: [
|
|
1485
1510
|
"gskills-admin skills install",
|
|
1486
1511
|
"gskills-admin skills install --target ~/.codex/skills",
|
|
1512
|
+
"gskills-admin skills install --name gskills-vocabulary",
|
|
1513
|
+
"gskills-admin skills install --name gskills-customer-playbooks",
|
|
1487
1514
|
"gskills-admin skills install --name gskills-feedback-db-ops",
|
|
1488
1515
|
"gskills-admin skills path"
|
|
1489
1516
|
],
|
|
@@ -1593,6 +1620,11 @@ var resourceHelp = (resource) => ({
|
|
|
1593
1620
|
`gskills-admin ${resource.name} delete <id> --force --confirm-delete ${resource.name}:<id>`
|
|
1594
1621
|
],
|
|
1595
1622
|
defaultFields: resource.defaultFields,
|
|
1623
|
+
cache: {
|
|
1624
|
+
scopes: resource.cacheScopes ?? [],
|
|
1625
|
+
invalidate: resource.cacheScopes?.length ? `gskills-admin cache invalidate --instance <instanceId> --scope ${resource.cacheScopes[0]} --dry-run` : null,
|
|
1626
|
+
note: resource.cacheScopes?.length ? "After create/update/delete, deploy views may still show cached content. Dry-run and invalidate the relevant scope, then verify the visible page." : "No deploy-cache scope is listed for this raw resource. If the write affects visible content indirectly, use cache scopes to choose a broader invalidation."
|
|
1627
|
+
},
|
|
1596
1628
|
deleteWarning: "Delete permanently removes production data and requires an exact --confirm-delete token."
|
|
1597
1629
|
});
|
|
1598
1630
|
|
package/package.json
CHANGED
|
@@ -1,132 +1,148 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gskills-access-entity-ops
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when Codex is asked to maintain GSkills access/auth/session/entity data outside normal dev work: domain auth, Okta/Google relogin, session invalidation, access passes, entities, groups, org units, content restrictions, and user visibility simulation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# GSkills Access
|
|
6
|
+
# GSkills Access, Auth, Entity Ops
|
|
7
7
|
|
|
8
|
-
Use this
|
|
8
|
+
Use this for Codex-backed access and visibility maintenance.
|
|
9
9
|
|
|
10
|
-
This is
|
|
10
|
+
This is not UI browsing. It is DB-backed auth/access work where a wrong mutation can lock people out or expose content.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## What Codex Has Actually Been Used For
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- Adding Air Liquide auth domains by updating `Instance.domainGranular` in prod.
|
|
15
|
+
- Building and using a data-level JWT session invalidation mechanism.
|
|
16
|
+
- Disconnecting all Air Liquide users so they re-auth through Okta without deleting accounts.
|
|
17
|
+
- Simulating affected users for content visibility bugs.
|
|
18
|
+
- Proving when a user sees hidden content in home/search but not navbar.
|
|
19
|
+
- Checking entity and restriction state when content visibility is wrong.
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
- Theo visited content restrictions 70 times.
|
|
18
|
-
- Theo visited entities 58 times.
|
|
19
|
-
- Theo visited project data 44 times.
|
|
20
|
-
- Theo visited org-units routes in deploy admin.
|
|
21
|
-
- Chronicle and previous CLI work show recurring Air Liquide/entity/cache/visibility checks.
|
|
21
|
+
## Auth Domain Updates
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Use this when the user asks to add domains to an instance login system.
|
|
24
24
|
|
|
25
|
-
1. Identify the instance
|
|
26
|
-
2.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
1. Identify the instance.
|
|
26
|
+
2. Read:
|
|
27
|
+
- `Instance.id`
|
|
28
|
+
- `Instance.URL`
|
|
29
|
+
- `Instance.InstanceAddStyle`
|
|
30
|
+
- `Instance.domainGranular`
|
|
31
|
+
- `RunningState`
|
|
32
|
+
3. Confirm the runtime code path.
|
|
33
|
+
- `src/auth.ts`
|
|
34
|
+
- `src/lib/server/instance-auth.ts`
|
|
35
|
+
4. Normalize and deduplicate domains.
|
|
36
|
+
5. Write only `Instance.domainGranular` if that is the intended change.
|
|
37
|
+
6. Verify:
|
|
38
|
+
- saved count,
|
|
39
|
+
- expected count,
|
|
40
|
+
- missing domains,
|
|
41
|
+
- extra domains.
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
Known Air Liquide facts from prior Codex operation:
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
- instance id `cmfwilgzb000404kzmfrkuifm`
|
|
46
|
+
- URL `air-liquide`
|
|
47
|
+
- `InstanceAddStyle = GRANULAR_DOMAIN`
|
|
48
|
+
- auth matching reads `Instance.domainGranular`
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
## Session Invalidation
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
- email and provider identity,
|
|
40
|
-
- active `AccessPass`,
|
|
41
|
-
- start/end dates,
|
|
42
|
-
- pass type,
|
|
43
|
-
- access workflow logs,
|
|
44
|
-
- login logs.
|
|
52
|
+
Use this when users need to reconnect through a new provider, especially Google to Okta.
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
Rules:
|
|
47
55
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
- Never delete accounts to disconnect users.
|
|
57
|
+
- This app uses JWT cookies, not DB `Session` rows.
|
|
58
|
+
- Invalidation is done through `User.sessionVersion`.
|
|
59
|
+
- Audit fields are `sessionInvalidatedAt` and `sessionInvalidationReason`.
|
|
60
|
+
- Provider state is `lastAuthProvider`.
|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
Preferred operation:
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
1. Query target users.
|
|
65
|
+
2. Dry-run count.
|
|
66
|
+
3. Use Prisma/TypeScript through `src/lib/db.ts`.
|
|
67
|
+
4. Increment `sessionVersion`.
|
|
68
|
+
5. Set invalidation audit fields.
|
|
69
|
+
6. Re-count affected rows.
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
- legacy groups,
|
|
60
|
-
- Google groups,
|
|
61
|
-
- org units,
|
|
62
|
-
- synced Google Admin data.
|
|
71
|
+
Known Air Liquide operation:
|
|
63
72
|
|
|
64
|
-
|
|
73
|
+
- 52 users were invalidated.
|
|
74
|
+
- Updated `User.sessionVersion`.
|
|
75
|
+
- No accounts, access passes, or provider rows were deleted.
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
gskills-
|
|
70
|
-
gskills-admin org-units-sync google --instance <instanceId> --dry-run --output json
|
|
77
|
+
Use the existing repo skill too:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
$gskills-user-session-invalidation
|
|
71
81
|
```
|
|
72
82
|
|
|
73
|
-
|
|
83
|
+
## Visibility And Entity Simulation
|
|
74
84
|
|
|
75
|
-
|
|
85
|
+
Use this when the user says a person can or cannot see a page/resource/path.
|
|
76
86
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
87
|
+
1. Query affected user.
|
|
88
|
+
2. Query a working comparison user when available.
|
|
89
|
+
3. Query:
|
|
90
|
+
- access pass,
|
|
91
|
+
- legacy groups,
|
|
92
|
+
- manual groups,
|
|
93
|
+
- Google groups,
|
|
94
|
+
- org units,
|
|
95
|
+
- page `visibleEntityIds`,
|
|
96
|
+
- category and learning-path restrictions,
|
|
97
|
+
- inactive/reverted category flags.
|
|
98
|
+
4. Simulate each user-visible surface separately:
|
|
99
|
+
- home cards,
|
|
100
|
+
- search,
|
|
101
|
+
- menu/navbar,
|
|
102
|
+
- direct page route.
|
|
103
|
+
5. If the fix is code, verify with the same prod-shaped simulation.
|
|
104
|
+
6. If the fix is data, write the narrowest possible change and invalidate relevant cache.
|
|
83
105
|
|
|
84
|
-
|
|
106
|
+
Known failure mode:
|
|
85
107
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
gskills-admin entities set-page-visibility --instance <instanceId> --page <pageId> --entity-ids google-group:team@example.com --dry-run --output json
|
|
89
|
-
```
|
|
108
|
+
- A user can see cards or search results for pages that later 404 because home/search filtering is looser than the page route guard.
|
|
109
|
+
- A clean navbar simulation does not prove home/search are clean.
|
|
90
110
|
|
|
91
|
-
##
|
|
111
|
+
## Access Pass Work
|
|
92
112
|
|
|
93
|
-
|
|
113
|
+
Use this when the issue is login/access rather than content visibility.
|
|
94
114
|
|
|
95
|
-
|
|
96
|
-
2. Query the content item, page, menu item, category, or learning path.
|
|
97
|
-
3. Query restrictions and source ids.
|
|
98
|
-
4. Simulate the same runtime filter used by the deploy page.
|
|
99
|
-
5. Compare with a working user in the same instance.
|
|
100
|
-
6. Check whether cache can rebuild stale visibility.
|
|
115
|
+
Check:
|
|
101
116
|
|
|
102
|
-
|
|
117
|
+
- `User.instanceID`
|
|
118
|
+
- active `AccessPass`
|
|
119
|
+
- pass type and dates,
|
|
120
|
+
- workflow logs for access start/expiry,
|
|
121
|
+
- login logs.
|
|
103
122
|
|
|
104
|
-
|
|
123
|
+
Do not grant broad pass access to hide a content-restriction bug.
|
|
105
124
|
|
|
106
|
-
|
|
125
|
+
## Entity And Org Unit Work
|
|
107
126
|
|
|
108
|
-
|
|
109
|
-
- whether groups/OUs/users are present,
|
|
110
|
-
- whether analytics inputs exist,
|
|
111
|
-
- whether project metadata matches the instance,
|
|
112
|
-
- whether client-specific settings changed.
|
|
127
|
+
Use existing CLI/API paths where possible:
|
|
113
128
|
|
|
114
|
-
|
|
129
|
+
```bash
|
|
130
|
+
gskills-admin entities list --instance <instanceId> --language fr --output json
|
|
131
|
+
gskills-admin entities access-summary --instance <instanceId> --output json
|
|
132
|
+
gskills-admin entities sync-google-groups --instance <instanceId> --output json
|
|
133
|
+
gskills-admin org-units-sync google --instance <instanceId> --dry-run --output json
|
|
134
|
+
```
|
|
115
135
|
|
|
116
|
-
-
|
|
117
|
-
- find its source query or table,
|
|
118
|
-
- compare native DB rows with derived analytics rows,
|
|
119
|
-
- report whether the gap is data ingestion, transformation, or UI filtering.
|
|
136
|
+
For writes, dry-run first and report the exact target entities.
|
|
120
137
|
|
|
121
|
-
##
|
|
138
|
+
## Done Criteria
|
|
122
139
|
|
|
123
140
|
Return:
|
|
124
141
|
|
|
125
142
|
- instance id/name,
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
- admin log slug created or expected.
|
|
143
|
+
- exact user/entity ids,
|
|
144
|
+
- before state,
|
|
145
|
+
- mutation performed,
|
|
146
|
+
- after state,
|
|
147
|
+
- whether cache was invalidated,
|
|
148
|
+
- whether users need to log in again.
|
|
@@ -9,6 +9,11 @@ Use this skill when you need to operate GSkills as a super admin from an agent.
|
|
|
9
9
|
|
|
10
10
|
The CLI is intentionally boring. It logs in through GSkills Auth, calls GSkills API routes, and never asks an agent for a database URL.
|
|
11
11
|
|
|
12
|
+
Also install and use the companion skills:
|
|
13
|
+
|
|
14
|
+
- `gskills-vocabulary` when explaining work to admins or writing user-facing summaries.
|
|
15
|
+
- `gskills-customer-playbooks` when the task names a recurring GSkills customer.
|
|
16
|
+
|
|
12
17
|
## Install
|
|
13
18
|
|
|
14
19
|
```bash
|
|
@@ -54,6 +59,16 @@ gskills-admin pages update <id> --data '{"disabled":false}' --dry-run --output j
|
|
|
54
59
|
|
|
55
60
|
5. Apply the exact same command without `--dry-run` only after the payload is correct.
|
|
56
61
|
|
|
62
|
+
6. For visible content changes, check the resource cache hint and refresh cache when needed.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
gskills-admin pages help --output json
|
|
66
|
+
gskills-admin cache invalidate --instance <instanceId> --scope pages --dry-run --output json
|
|
67
|
+
gskills-admin cache invalidate --instance <instanceId> --scope pages --yes --output json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
57
72
|
Deletes are stricter than other writes. They require both `--force` and an exact confirmation token.
|
|
58
73
|
|
|
59
74
|
```bash
|
|
@@ -258,6 +273,17 @@ gskills-admin cache invalidate --instance <instanceId> --scope menu-bundle --yes
|
|
|
258
273
|
gskills-admin cache invalidate --instance <instanceId> --scope all --yes --output json
|
|
259
274
|
```
|
|
260
275
|
|
|
276
|
+
CRUD resources that expose `cache.scopes` in `gskills-admin <resource> help --output json` should be treated as cached. After a raw write on one of those resources, dry-run the cache invalidation plan, apply it with `--yes`, then re-check the visible product surface.
|
|
277
|
+
|
|
278
|
+
Typical mapping:
|
|
279
|
+
|
|
280
|
+
- courses, tutorials, granules, modules, quizzes, badges, parcours, Chromebook content: `pages`
|
|
281
|
+
- base de connaissance pages and knowledge-facing resources: `pages-knowledge`
|
|
282
|
+
- applications: `applications`, often with `pages` or `pages-knowledge`
|
|
283
|
+
- menus: `menu-bundle`
|
|
284
|
+
- content restrictions and group visibility: usually `menu-bundle`, sometimes `pages`, `pages-knowledge`, or `applications`
|
|
285
|
+
- broad instance settings or feature flags: `all`
|
|
286
|
+
|
|
261
287
|
## Feedback Emails
|
|
262
288
|
|
|
263
289
|
Use `send-reply` for the normal email available from the feedback detail dialog. It uses the `GSkillsEmail` template, sends to the feedback user, stores a `FeedbackReply`, updates `repliedAt`, and writes admin logs.
|
|
@@ -415,6 +441,36 @@ gskills-admin quiz-attempts list --where '{"user":{"instanceID":"<instanceId>"}}
|
|
|
415
441
|
|
|
416
442
|
Prefer these read paths for analytics investigation. They are intentionally raw enough to match UI analytics data without giving the agent a DB URL.
|
|
417
443
|
|
|
444
|
+
## User Activity Raw Ops
|
|
445
|
+
|
|
446
|
+
The CLI intentionally exposes user activity as raw authenticated resources, not as a magic repair wizard.
|
|
447
|
+
|
|
448
|
+
Supported raw activity surfaces:
|
|
449
|
+
|
|
450
|
+
- `user-paths`: course, tutorial, granule, or module completion rows.
|
|
451
|
+
- `quiz-attempts`: quiz attempts and completion state.
|
|
452
|
+
- `user-badges`: awarded badges.
|
|
453
|
+
- `user-learning-paths`: parcours progress and completion.
|
|
454
|
+
- `user-learning-path-item-completions`: completed items inside a parcours.
|
|
455
|
+
- `chromebook-progress`: Chromebook game exercise progress.
|
|
456
|
+
- `analytics`: raw activity events used by analytics surfaces.
|
|
457
|
+
|
|
458
|
+
When a super admin asks whether an agent can inspect or fix activity, the answer is yes through these raw resources. Read the user, instance, content row, and existing activity rows first. Use `--dry-run` before writes, then re-read the changed rows.
|
|
459
|
+
|
|
460
|
+
Examples:
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
gskills-admin users list --where '{"email":"user@example.com"}' --fields id,email,name,instanceID --output json
|
|
464
|
+
gskills-admin user-paths list --where '{"userId":"<userId>"}' --output json
|
|
465
|
+
gskills-admin quiz-attempts list --where '{"userId":"<userId>"}' --output json
|
|
466
|
+
gskills-admin user-badges list --where '{"userId":"<userId>"}' --output json
|
|
467
|
+
gskills-admin user-learning-paths list --where '{"userId":"<userId>"}' --output json
|
|
468
|
+
gskills-admin user-learning-path-item-completions list --where '{"userId":"<userId>"}' --output json
|
|
469
|
+
gskills-admin chromebook-progress list --where '{"userId":"<userId>"}' --output json
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Raw fixes are allowed, but do not pretend a single row always covers the whole product behavior. For example, a quiz completion can also matter for a parcours, a badge, a workflow, points, or analytics. If the user asked for a visible result, verify the visible result after the raw write.
|
|
473
|
+
|
|
418
474
|
## Cache Scope Choice
|
|
419
475
|
|
|
420
476
|
Prefer the narrowest scope:
|