@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.
@@ -425,7 +425,7 @@ var resources = [
425
425
  defaultFields: ["id", "title", "type", "language", "instanceId", "isActive", "disabled", "archived", "alphaProgramIds", "updatedAt"],
426
426
  syncable: true,
427
427
  dangerousDelete: true,
428
- cacheScopes: ["pages-knowledge"]
428
+ cacheScopes: ["resources", "learning-paths"]
429
429
  },
430
430
  {
431
431
  name: "internal-knowledge",
@@ -435,14 +435,14 @@ var resources = [
435
435
  defaultFields: ["id", "title", "language", "instanceId", "isActive", "isAIAllowed", "disabled", "archived", "alphaProgramIds", "updatedAt"],
436
436
  syncable: true,
437
437
  dangerousDelete: true,
438
- cacheScopes: ["pages-knowledge"]
438
+ cacheScopes: ["pages-knowledge", "learning-paths"]
439
439
  },
440
440
  {
441
441
  name: "learning-paths",
442
442
  delegate: "learningPath",
443
443
  label: "Learning paths",
444
444
  aliases: ["learning-path", "paths", "path"],
445
- defaultFields: ["id", "name", "slug", "language", "instanceId", "isActive", "mandatory", "disabled", "archived", "alphaProgramIds", "updatedAt"],
445
+ defaultFields: ["id", "name", "slug", "language", "instanceId", "iconUrl", "isActive", "mandatory", "disabled", "archived", "alphaProgramIds", "updatedAt"],
446
446
  syncable: true,
447
447
  dangerousDelete: true,
448
448
  cacheScopes: ["pages", "pages-knowledge"]
@@ -505,6 +505,49 @@ var resources = [
505
505
  dangerousDelete: true,
506
506
  cacheScopes: ["pages", "pages-knowledge"]
507
507
  },
508
+ {
509
+ name: "content-governance-entries",
510
+ delegate: "contentGovernanceEntry",
511
+ label: "Content governance entries",
512
+ aliases: ["content-governance-entry", "governance-entries", "governance-entry"],
513
+ defaultFields: ["id", "entityType", "entityId", "instanceId", "status", "revisionClassification", "dueDate", "nextRevisionAt", "taskTitle", "createdById", "updatedAt"],
514
+ dangerousDelete: true
515
+ },
516
+ {
517
+ name: "content-governance-assignees",
518
+ delegate: "contentGovernanceAssignee",
519
+ label: "Content governance assignees",
520
+ aliases: ["content-governance-assignee", "governance-assignees", "governance-assignee"],
521
+ defaultFields: ["entryId", "userId", "assignedAt"],
522
+ instanceField: null,
523
+ dangerousDelete: true
524
+ },
525
+ {
526
+ name: "content-metrics-snapshots",
527
+ delegate: "contentMetricsSnapshot",
528
+ label: "Content metrics snapshots",
529
+ aliases: ["content-metrics", "governance-metrics", "metrics-snapshots"],
530
+ defaultFields: ["entityType", "entityId", "feedbackCount", "uniqueViews", "lastPublishedAt", "lastEditorId", "syncedAt"],
531
+ instanceField: null
532
+ },
533
+ {
534
+ name: "content-comments",
535
+ delegate: "contentComment",
536
+ label: "Content comments",
537
+ aliases: ["content-comment", "governance-comments", "comment-threads"],
538
+ defaultFields: ["id", "targetType", "targetId", "authorId", "content", "blockId", "parentId", "resolvedAt", "resolvedById", "createdAt", "updatedAt"],
539
+ instanceField: null,
540
+ dangerousDelete: true
541
+ },
542
+ {
543
+ name: "content-comment-mentions",
544
+ delegate: "contentCommentMention",
545
+ label: "Content comment mentions",
546
+ aliases: ["content-comment-mention", "comment-mentions"],
547
+ defaultFields: ["commentId", "userId", "createdAt"],
548
+ instanceField: null,
549
+ dangerousDelete: true
550
+ },
508
551
  {
509
552
  name: "project-data",
510
553
  delegate: "instanceProjectData",
@@ -589,7 +632,21 @@ var resources = [
589
632
  delegate: "skill",
590
633
  label: "Skills",
591
634
  aliases: ["skill", "gskills-skills", "catalog-skills", "skill-catalog-skills"],
592
- defaultFields: ["id", "clusterId", "key", "name", "scope", "instanceId", "sourceLanguage", "difficulty", "status", "validationTypes", "requiresAI", "alphaProgramIds", "updatedAt"],
635
+ defaultFields: [
636
+ "id",
637
+ "clusterId",
638
+ "key",
639
+ "name",
640
+ "scope",
641
+ "instanceId",
642
+ "sourceLanguage",
643
+ "difficulty",
644
+ "status",
645
+ "validationTypes",
646
+ "requiresAI",
647
+ "alphaProgramIds",
648
+ "updatedAt"
649
+ ],
593
650
  instanceField: "instanceId",
594
651
  dangerousDelete: true,
595
652
  cacheScopes: ["pages", "pages-knowledge"]
@@ -801,7 +858,20 @@ var resources = [
801
858
  delegate: "importedSheet",
802
859
  label: "Imported sheets",
803
860
  aliases: ["imported-sheet", "sheets-imported", "google-sheets-imports"],
804
- defaultFields: ["id", "displayName", "spreadsheetTitle", "selectedTabName", "instanceId", "status", "multilangMode", "defaultLocale", "enabledLocales", "enableVectorization", "lastSyncedAt", "updatedAt"],
861
+ defaultFields: [
862
+ "id",
863
+ "displayName",
864
+ "spreadsheetTitle",
865
+ "selectedTabName",
866
+ "instanceId",
867
+ "status",
868
+ "multilangMode",
869
+ "defaultLocale",
870
+ "enabledLocales",
871
+ "enableVectorization",
872
+ "lastSyncedAt",
873
+ "updatedAt"
874
+ ],
805
875
  dangerousDelete: true,
806
876
  cacheScopes: ["pages-knowledge"]
807
877
  },
@@ -810,7 +880,20 @@ var resources = [
810
880
  delegate: "importedSheetColumn",
811
881
  label: "Imported sheet columns",
812
882
  aliases: ["imported-sheet-column", "sheet-columns"],
813
- defaultFields: ["id", "importedSheetId", "position", "displayOrder", "headerName", "inferredType", "isVisible", "isFilterable", "includeInVectorization", "displayType", "showLabel", "updatedAt"],
883
+ defaultFields: [
884
+ "id",
885
+ "importedSheetId",
886
+ "position",
887
+ "displayOrder",
888
+ "headerName",
889
+ "inferredType",
890
+ "isVisible",
891
+ "isFilterable",
892
+ "includeInVectorization",
893
+ "displayType",
894
+ "showLabel",
895
+ "updatedAt"
896
+ ],
814
897
  instanceField: null,
815
898
  cacheScopes: ["pages-knowledge"]
816
899
  },
@@ -897,7 +980,18 @@ var resources = [
897
980
  delegate: "entityRuleConfig",
898
981
  label: "Entity restriction rules",
899
982
  aliases: ["entity-rules", "content-restriction-rules", "restrictions"],
900
- defaultFields: ["id", "instanceId", "entityId", "restrictionMode", "categoryIds", "learningPathRestrictionMode", "learningPathIds", "alphaAllPrograms", "alphaProgramIds", "updatedAt"],
983
+ defaultFields: [
984
+ "id",
985
+ "instanceId",
986
+ "entityId",
987
+ "restrictionMode",
988
+ "categoryIds",
989
+ "learningPathRestrictionMode",
990
+ "learningPathIds",
991
+ "alphaAllPrograms",
992
+ "alphaProgramIds",
993
+ "updatedAt"
994
+ ],
901
995
  dangerousDelete: true,
902
996
  cacheScopes: ["menu-bundle", "pages", "pages-knowledge", "applications"]
903
997
  },
@@ -1039,14 +1133,14 @@ var pageContentSchema = {
1039
1133
  note: "Each column owns its own EditorJS block array."
1040
1134
  },
1041
1135
  {
1042
- blockTypes: ["accordion_tool", "vertical_accordion"],
1136
+ blockTypes: ["accordion_tool", "vertical_accordion", "vertical_accordion_tool"],
1043
1137
  childBlocksPath: "/blocks/<i>/data/sections/<j>/content/blocks",
1044
1138
  note: "Each section has a title and a nested EditorJS content object."
1045
1139
  },
1046
1140
  {
1047
1141
  blockTypes: ["section_tool"],
1048
1142
  childBlocksPath: "/blocks/<i>/data/content/blocks",
1049
- note: "A section is a visual wrapper around nested blocks. Gemini sections set data.gemini=true."
1143
+ note: "A section is a visual wrapper around nested blocks. Legacy pages may use data.blocks instead."
1050
1144
  },
1051
1145
  {
1052
1146
  blockTypes: ["tabs"],
@@ -1174,6 +1268,14 @@ var pageContentSchema = {
1174
1268
  data: { sections: "array of { title, content, isOpen }", color: "hex color string", orientation: "vertical" },
1175
1269
  example: { color: "#2E5FAC", orientation: "vertical", sections: [{ title: "Etape 1", content: { blocks: [] }, isOpen: false }] }
1176
1270
  }),
1271
+ block("vertical_accordion_tool", {
1272
+ label: "Legacy Vertical Accordion",
1273
+ category: "layout",
1274
+ purpose: "Legacy vertical accordion type still present in older pages. Preserve it when patching existing content.",
1275
+ data: { sections: "array of { title, content, isOpen }", color: "hex color string", orientation: "vertical" },
1276
+ example: { color: "#2E5FAC", orientation: "vertical", sections: [{ title: "Etape 1", content: { blocks: [] }, isOpen: false }] },
1277
+ notes: ["Use vertical_accordion for new content. Keep vertical_accordion_tool on existing blocks unless doing a reviewed migration."]
1278
+ }),
1177
1279
  block("section_tool", {
1178
1280
  label: "Section",
1179
1281
  category: "layout",
@@ -1639,7 +1741,7 @@ var childBlockContainers = (block2, blockPath) => {
1639
1741
  }
1640
1742
  });
1641
1743
  }
1642
- if ((block2.type === "accordion_tool" || block2.type === "vertical_accordion") && Array.isArray(data.sections)) {
1744
+ if ((block2.type === "accordion_tool" || block2.type === "vertical_accordion" || block2.type === "vertical_accordion_tool") && Array.isArray(data.sections)) {
1643
1745
  data.sections.forEach((section, sectionIndex) => {
1644
1746
  if (isPlainRecord(section) && isPlainRecord(section.content) && Array.isArray(section.content.blocks)) {
1645
1747
  containers.push({
@@ -1649,11 +1751,18 @@ var childBlockContainers = (block2, blockPath) => {
1649
1751
  }
1650
1752
  });
1651
1753
  }
1652
- if (block2.type === "section_tool" && isPlainRecord(data.content) && Array.isArray(data.content.blocks)) {
1653
- containers.push({
1654
- path: blockPath.concat(["data", "content", "blocks"]),
1655
- blocks: data.content.blocks
1656
- });
1754
+ if (block2.type === "section_tool") {
1755
+ if (isPlainRecord(data.content) && Array.isArray(data.content.blocks)) {
1756
+ containers.push({
1757
+ path: blockPath.concat(["data", "content", "blocks"]),
1758
+ blocks: data.content.blocks
1759
+ });
1760
+ } else if (Array.isArray(data.blocks)) {
1761
+ containers.push({
1762
+ path: blockPath.concat(["data", "blocks"]),
1763
+ blocks: data.blocks
1764
+ });
1765
+ }
1657
1766
  }
1658
1767
  if (block2.type === "tabs" && Array.isArray(data.tabs)) {
1659
1768
  data.tabs.forEach((tab, tabIndex) => {
@@ -1692,7 +1801,7 @@ var validateContainerShape = (block2, path, errors) => {
1692
1801
  }
1693
1802
  });
1694
1803
  }
1695
- if (block2.type === "accordion_tool" || block2.type === "vertical_accordion") {
1804
+ if (block2.type === "accordion_tool" || block2.type === "vertical_accordion" || block2.type === "vertical_accordion_tool") {
1696
1805
  if (!Array.isArray(data.sections)) {
1697
1806
  errors.push(`${path}/data/sections must be an array`);
1698
1807
  return;
@@ -1703,8 +1812,12 @@ var validateContainerShape = (block2, path, errors) => {
1703
1812
  }
1704
1813
  });
1705
1814
  }
1706
- if (block2.type === "section_tool" && (!isPlainRecord(data.content) || !Array.isArray(data.content.blocks))) {
1707
- errors.push(`${path}/data/content/blocks must be an array`);
1815
+ if (block2.type === "section_tool") {
1816
+ const hasCanonicalBlocks = isPlainRecord(data.content) && Array.isArray(data.content.blocks);
1817
+ const hasLegacyBlocks = Array.isArray(data.blocks);
1818
+ if (!hasCanonicalBlocks && !hasLegacyBlocks) {
1819
+ errors.push(`${path}/data/content/blocks or ${path}/data/blocks must be an array`);
1820
+ }
1708
1821
  }
1709
1822
  if (block2.type === "tabs") {
1710
1823
  if (!Array.isArray(data.tabs)) {
@@ -1923,6 +2036,10 @@ var runCommand = async (ctx) => {
1923
2036
  return runAdminIngestCommand(actionOrResource, ctx);
1924
2037
  if (group === "content-assistant")
1925
2038
  return runContentAssistantCommand(actionOrResource, ctx);
2039
+ if (group === "governance")
2040
+ return runGovernanceCommand(actionOrResource, maybeAction, rest, ctx);
2041
+ if (group === "page-comments" || group === "page-comment")
2042
+ return runPageCommentsCommand(actionOrResource, maybeAction, ctx);
1926
2043
  if (group === "entities")
1927
2044
  return runEntitiesCommand(actionOrResource, maybeAction, ctx);
1928
2045
  if (group === "org-units-sync")
@@ -1986,6 +2103,9 @@ var runResourceCommand = async (resource, action, maybeId, rest, ctx) => {
1986
2103
  throw new CliError("Missing pages id", 2);
1987
2104
  return runPagesPatchContentCommand(maybeId, ctx);
1988
2105
  }
2106
+ if (resource.name === "learning-paths" && isLearningPathIconAction(action)) {
2107
+ return runLearningPathIconCommand(resource, action, maybeId, ctx);
2108
+ }
1989
2109
  if (action === "list")
1990
2110
  return listResource(resource, ctx);
1991
2111
  if (action === "get") {
@@ -2041,7 +2161,10 @@ var createResource = async (resource, ctx) => {
2041
2161
  const instanceField = resource.instanceField === undefined ? "instanceId" : resource.instanceField;
2042
2162
  if (instanceId && instanceField && !instanceField.includes(".") && data[instanceField] === undefined)
2043
2163
  data[instanceField] = instanceId;
2044
- await applyUploadFileData(resource, data, ctx, { id: null, instanceId: getInstanceIdFromData(data) ?? instanceId });
2164
+ await applyUploadFileData(resource, data, ctx, {
2165
+ id: null,
2166
+ instanceId: getInstanceIdFromData(data) ?? instanceId
2167
+ });
2045
2168
  if (Object.keys(data).length === 0)
2046
2169
  throw new CliError("Missing --data or --data-file JSON", 2);
2047
2170
  if (hasFlag(ctx, "dry-run"))
@@ -2054,7 +2177,10 @@ var createResource = async (resource, ctx) => {
2054
2177
  var updateResource = async (resource, id, ctx) => {
2055
2178
  requireWriteConfirmation(`${resource.label} update writes data. Add --yes or use --dry-run.`, ctx);
2056
2179
  const data = await parseJsonObjectFlag(ctx, "data", "data-file");
2057
- await applyUploadFileData(resource, data, ctx, { id, instanceId: getStringFlag(ctx, "instance") ?? getInstanceIdFromData(data) });
2180
+ await applyUploadFileData(resource, data, ctx, {
2181
+ id,
2182
+ instanceId: getStringFlag(ctx, "instance") ?? getInstanceIdFromData(data)
2183
+ });
2058
2184
  if (Object.keys(data).length === 0)
2059
2185
  throw new CliError("Missing --data or --data-file JSON", 2);
2060
2186
  if (hasFlag(ctx, "dry-run"))
@@ -2064,7 +2190,142 @@ var updateResource = async (resource, id, ctx) => {
2064
2190
  body: JSON.stringify({ data })
2065
2191
  });
2066
2192
  };
2067
- var UPLOADABLE_RESOURCE_NAMES = new Set(["internal-knowledge", "resources"]);
2193
+ var runLearningPathIconCommand = async (resource, action, learningPathId, ctx) => {
2194
+ if (action === "icons") {
2195
+ const searchParams = new URLSearchParams;
2196
+ const query = getStringFlag(ctx, "query") ?? getStringFlag(ctx, "search");
2197
+ const take = getNumberFlag(ctx, "take");
2198
+ if (query)
2199
+ searchParams.set("query", query);
2200
+ if (take)
2201
+ searchParams.set("take", String(take));
2202
+ if (hasFlag(ctx, "dry-run")) {
2203
+ return {
2204
+ dryRun: true,
2205
+ resource: "learning-path-icons",
2206
+ source: "global-french-category-app-icons",
2207
+ query: query ?? null,
2208
+ take: take ?? 50
2209
+ };
2210
+ }
2211
+ const suffix = searchParams.size > 0 ? `?${searchParams.toString()}` : "";
2212
+ return requestApi(`/api/cli/learning-path-icons${suffix}`);
2213
+ }
2214
+ if (!learningPathId)
2215
+ throw new CliError("Missing learning path id", 2);
2216
+ if (action === "set-icon") {
2217
+ requireWriteConfirmation("Learning path icon update writes data. Add --yes or use --dry-run.", ctx);
2218
+ const categoryRef = getStringFlag(ctx, "category") ?? getStringFlag(ctx, "app") ?? getStringFlag(ctx, "icon");
2219
+ const uploadFilePath = getStringFlag(ctx, "upload-file") ?? getStringFlag(ctx, "icon-file");
2220
+ if (categoryRef && uploadFilePath) {
2221
+ throw new CliError("Use either --category/--app or --upload-file, not both", 2);
2222
+ }
2223
+ if (!categoryRef && !uploadFilePath) {
2224
+ throw new CliError("Missing --category, --app, --upload-file, or --icon-file", 2);
2225
+ }
2226
+ if (categoryRef) {
2227
+ if (hasFlag(ctx, "dry-run")) {
2228
+ return {
2229
+ dryRun: true,
2230
+ resource: resource.name,
2231
+ id: learningPathId,
2232
+ mode: "category",
2233
+ categoryRef,
2234
+ data: {
2235
+ iconUrl: "<resolved global French category app icon>"
2236
+ }
2237
+ };
2238
+ }
2239
+ const category = await resolveLearningPathIconCategory(categoryRef);
2240
+ return requestApi(`/api/cli/${resource.name}/${learningPathId}`, {
2241
+ method: "PATCH",
2242
+ body: JSON.stringify({
2243
+ data: {
2244
+ iconUrl: category.icon
2245
+ }
2246
+ })
2247
+ });
2248
+ }
2249
+ const data = {};
2250
+ const resolvedUploadFilePath = uploadFilePath;
2251
+ if (!resolvedUploadFilePath) {
2252
+ throw new CliError("Missing --upload-file or --icon-file", 2);
2253
+ }
2254
+ const uploadCtx = {
2255
+ ...ctx,
2256
+ flags: {
2257
+ ...ctx.flags,
2258
+ "upload-file": resolvedUploadFilePath
2259
+ }
2260
+ };
2261
+ await applyUploadFileData(resource, data, uploadCtx, {
2262
+ id: learningPathId,
2263
+ instanceId: getStringFlag(ctx, "instance")
2264
+ });
2265
+ if (hasFlag(ctx, "dry-run")) {
2266
+ return {
2267
+ dryRun: true,
2268
+ resource: resource.name,
2269
+ id: learningPathId,
2270
+ mode: "upload",
2271
+ data
2272
+ };
2273
+ }
2274
+ return requestApi(`/api/cli/${resource.name}/${learningPathId}`, {
2275
+ method: "PATCH",
2276
+ body: JSON.stringify({ data })
2277
+ });
2278
+ }
2279
+ if (action === "generate-icon") {
2280
+ requireWriteConfirmation("Learning path icon generation writes data. Add --yes or use --dry-run.", ctx);
2281
+ const appRef = getStringFlag(ctx, "app") ?? getStringFlag(ctx, "category");
2282
+ const extraPrompt = await getTextFlag(ctx, "prompt", "prompt-file") ?? getStringFlag(ctx, "extra-prompt") ?? "";
2283
+ const useAppIcon = hasFlag(ctx, "use-app-icon");
2284
+ const app = appRef && !hasFlag(ctx, "dry-run") ? await resolveLearningPathIconCategory(appRef) : null;
2285
+ const payload = {
2286
+ extraPrompt,
2287
+ useAppIcon,
2288
+ appName: app?.name ?? appRef ?? getStringFlag(ctx, "app-name") ?? "",
2289
+ appIconUrl: useAppIcon ? app?.icon ?? getStringFlag(ctx, "app-icon-url") ?? "" : "",
2290
+ dryRun: hasFlag(ctx, "dry-run")
2291
+ };
2292
+ if (payload.dryRun) {
2293
+ return {
2294
+ dryRun: true,
2295
+ resource: resource.name,
2296
+ id: learningPathId,
2297
+ operation: "generate-icon",
2298
+ payload
2299
+ };
2300
+ }
2301
+ return requestApi(`/api/cli/${resource.name}/${learningPathId}/generate-icon`, {
2302
+ method: "POST",
2303
+ body: JSON.stringify(payload)
2304
+ });
2305
+ }
2306
+ throw new CliError(`Unknown learning-paths icon command "${action}"`, 2);
2307
+ };
2308
+ var isLearningPathIconAction = (action) => action === "icons" || action === "set-icon" || action === "generate-icon";
2309
+ var resolveLearningPathIconCategory = async (categoryRef) => {
2310
+ const searchParams = new URLSearchParams;
2311
+ searchParams.set("query", categoryRef);
2312
+ searchParams.set("take", "25");
2313
+ const result = await requestApi(`/api/cli/learning-path-icons?${searchParams.toString()}`);
2314
+ const categories = Array.isArray(result.icons) ? result.icons : [];
2315
+ const normalizedRef = normalizeCliSearchText(categoryRef);
2316
+ const category = categories.find((item) => [item.id, item.slug, item.name].some((value) => typeof value === "string" && normalizeCliSearchText(value) === normalizedRef)) ?? categories[0];
2317
+ if (!category || typeof category.icon !== "string") {
2318
+ throw new CliError(`No global French category app icon found for "${categoryRef}"`, 2);
2319
+ }
2320
+ return {
2321
+ id: String(category.id ?? ""),
2322
+ name: String(category.name ?? categoryRef),
2323
+ slug: String(category.slug ?? ""),
2324
+ icon: category.icon
2325
+ };
2326
+ };
2327
+ var normalizeCliSearchText = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
2328
+ var UPLOADABLE_RESOURCE_NAMES = new Set(["internal-knowledge", "resources", "learning-paths"]);
2068
2329
  var applyUploadFileData = async (resource, data, ctx, target) => {
2069
2330
  const uploadFilePath = getStringFlag(ctx, "upload-file");
2070
2331
  if (!uploadFilePath)
@@ -2094,6 +2355,9 @@ var prepareDirectUpload = async (resource, uploadFilePath, ctx, target) => {
2094
2355
  throw new CliError(`Upload file not found: ${uploadFilePath}`, 2);
2095
2356
  }
2096
2357
  const contentType = getStringFlag(ctx, "mime-type") ?? inferMimeType(filePath);
2358
+ if (resource.name === "learning-paths" && !contentType.startsWith("image/")) {
2359
+ throw new CliError("Learning path icon uploads must be image files. Use --mime-type image/png if the extension is ambiguous.", 2);
2360
+ }
2097
2361
  const instanceId = await resolveUploadInstanceId(resource, target);
2098
2362
  const fileName = getStringFlag(ctx, "upload-name") ?? basename(filePath);
2099
2363
  if (hasFlag(ctx, "dry-run")) {
@@ -2154,6 +2418,10 @@ var applyUploadedMediaData = (resource, data, upload) => {
2154
2418
  data.sourceType = "UPLOAD";
2155
2419
  data.fileUrl = upload.fileUrl;
2156
2420
  data.linkUrl = upload.fileUrl;
2421
+ return;
2422
+ }
2423
+ if (resource.name === "learning-paths") {
2424
+ data.iconUrl = upload.fileUrl;
2157
2425
  }
2158
2426
  };
2159
2427
  var setUploadInstanceData = (resource, data, instanceId) => {
@@ -2214,6 +2482,12 @@ var inferMimeType = (filePath) => {
2214
2482
  ".md": "text/markdown",
2215
2483
  ".html": "text/html",
2216
2484
  ".htm": "text/html",
2485
+ ".png": "image/png",
2486
+ ".jpg": "image/jpeg",
2487
+ ".jpeg": "image/jpeg",
2488
+ ".webp": "image/webp",
2489
+ ".gif": "image/gif",
2490
+ ".svg": "image/svg+xml",
2217
2491
  ".doc": "application/msword",
2218
2492
  ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
2219
2493
  };
@@ -2516,14 +2790,8 @@ var runSessionsCommand = async (action, ctx) => {
2516
2790
  return sessionsHelp();
2517
2791
  if (action !== "invalidate")
2518
2792
  throw new CliError(`Unknown sessions command "${action}"`, 2);
2519
- const userIds = [
2520
- ...splitCsv(getStringFlag(ctx, "users")),
2521
- ...splitCsv(getStringFlag(ctx, "user"))
2522
- ];
2523
- const emails = [
2524
- ...splitCsv(getStringFlag(ctx, "emails")),
2525
- ...splitCsv(getStringFlag(ctx, "email"))
2526
- ];
2793
+ const userIds = [...splitCsv(getStringFlag(ctx, "users")), ...splitCsv(getStringFlag(ctx, "user"))];
2794
+ const emails = [...splitCsv(getStringFlag(ctx, "emails")), ...splitCsv(getStringFlag(ctx, "email"))];
2527
2795
  if (userIds.length === 0 && emails.length === 0) {
2528
2796
  throw new CliError("Missing --user, --users, --email, or --emails", 2);
2529
2797
  }
@@ -2554,6 +2822,316 @@ var runContentAssistantCommand = async (action, ctx) => {
2554
2822
  }
2555
2823
  return requestApi(`/api/cli/content-assistant/lookup?${searchParams.toString()}`);
2556
2824
  };
2825
+ var runGovernanceCommand = async (action, maybeArg, rest, ctx) => {
2826
+ if (!action || action === "help")
2827
+ return governanceHelp();
2828
+ if (action === "comments") {
2829
+ return runGovernanceTaskCommentsCommand(maybeArg, rest[0], ctx);
2830
+ }
2831
+ if (action === "list" || action === "tasks") {
2832
+ return requestApi(`/api/cli/governance/tasks?${await governanceBoardSearchParams(ctx, "tasks")}`);
2833
+ }
2834
+ if (action === "get" || action === "task") {
2835
+ const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2836
+ if (!entryId)
2837
+ throw new CliError("Missing governance entry id", 2);
2838
+ const scope = governanceScope(ctx);
2839
+ return requestApi(`/api/cli/governance/tasks/${entryId}?${scope.toString()}`);
2840
+ }
2841
+ if (action === "comments-board" || action === "page-comments") {
2842
+ return requestApi(`/api/cli/governance/page-comments?${await governanceBoardSearchParams(ctx, "comments")}`);
2843
+ }
2844
+ if (action === "open-comment-count") {
2845
+ const scope = governanceScope(ctx);
2846
+ return requestApi(`/api/cli/governance/page-comments/count?${scope.toString()}`);
2847
+ }
2848
+ if (action === "search") {
2849
+ const scope = governanceScope(ctx);
2850
+ const query = getStringFlag(ctx, "query") ?? getStringFlag(ctx, "search") ?? "";
2851
+ scope.set("query", query);
2852
+ return requestApi(`/api/cli/governance/search?${scope.toString()}`);
2853
+ }
2854
+ if (action === "options") {
2855
+ const scope = governanceScope(ctx);
2856
+ return requestApi(`/api/cli/governance/options?${scope.toString()}`);
2857
+ }
2858
+ if (action === "users" || action === "assignable-users") {
2859
+ return requestApi("/api/cli/governance/users");
2860
+ }
2861
+ if (action === "instances") {
2862
+ return requestApi("/api/cli/governance/instances");
2863
+ }
2864
+ if (action === "create" || action === "create-task") {
2865
+ requireWriteConfirmation("Governance task creation writes data. Add --yes or use --dry-run.", ctx);
2866
+ return requestApi("/api/cli/governance/tasks", {
2867
+ method: "POST",
2868
+ body: JSON.stringify({
2869
+ ...await governanceTaskInput(ctx),
2870
+ dryRun: hasFlag(ctx, "dry-run")
2871
+ })
2872
+ });
2873
+ }
2874
+ if (action === "update" || action === "update-task" || action === "update-details") {
2875
+ requireWriteConfirmation("Governance task update writes data. Add --yes or use --dry-run.", ctx);
2876
+ const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2877
+ if (!entryId)
2878
+ throw new CliError("Missing governance entry id", 2);
2879
+ const taskTitle = await getTextFlag(ctx, "task-title", "task-title-file") ?? await getTextFlag(ctx, "title", "title-file");
2880
+ const taskDescription = await getTextFlag(ctx, "task-description", "task-description-file") ?? await getTextFlag(ctx, "description", "description-file");
2881
+ if (taskTitle === undefined && taskDescription === undefined) {
2882
+ throw new CliError("Missing --task-title, --title, --task-description, or --description", 2);
2883
+ }
2884
+ return requestApi(`/api/cli/governance/tasks/${entryId}/details`, {
2885
+ method: "PATCH",
2886
+ body: JSON.stringify({
2887
+ taskTitle,
2888
+ taskDescription,
2889
+ dryRun: hasFlag(ctx, "dry-run")
2890
+ })
2891
+ });
2892
+ }
2893
+ if (action === "upsert" || action === "set") {
2894
+ requireWriteConfirmation("Governance task field update writes data. Add --yes or use --dry-run.", ctx);
2895
+ return requestApi("/api/cli/governance/entry", {
2896
+ method: "POST",
2897
+ body: JSON.stringify({
2898
+ ...await governanceTaskInput(ctx),
2899
+ dryRun: hasFlag(ctx, "dry-run")
2900
+ })
2901
+ });
2902
+ }
2903
+ if (action === "set-assignees" || action === "assign") {
2904
+ requireWriteConfirmation("Governance assignee update writes data. Add --yes or use --dry-run.", ctx);
2905
+ const userIds = splitCsv(getStringFlag(ctx, "user-ids") ?? getStringFlag(ctx, "users") ?? getStringFlag(ctx, "assignees"));
2906
+ return requestApi("/api/cli/governance/assignees", {
2907
+ method: "POST",
2908
+ body: JSON.stringify({
2909
+ entryId: maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id"),
2910
+ entityType: getStringFlag(ctx, "entity-type") ?? getStringFlag(ctx, "type"),
2911
+ entityId: getStringFlag(ctx, "entity-id"),
2912
+ instanceId: getStringFlag(ctx, "instance") ?? "global",
2913
+ userIds,
2914
+ dryRun: hasFlag(ctx, "dry-run")
2915
+ })
2916
+ });
2917
+ }
2918
+ if (action === "set-instance" || action === "target-instance") {
2919
+ requireWriteConfirmation("Governance target instance update writes data. Add --yes or use --dry-run.", ctx);
2920
+ const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2921
+ if (!entryId)
2922
+ throw new CliError("Missing governance entry id", 2);
2923
+ const clearTarget = hasFlag(ctx, "all-instances") || hasFlag(ctx, "clear") || hasFlag(ctx, "no-target-instance");
2924
+ const targetInstanceId = clearTarget ? null : getStringFlag(ctx, "target-instance") ?? getStringFlag(ctx, "target");
2925
+ if (!clearTarget && !targetInstanceId) {
2926
+ throw new CliError("Missing --target-instance, --target, --all-instances, or --clear", 2);
2927
+ }
2928
+ return requestApi(`/api/cli/governance/tasks/${entryId}/instance`, {
2929
+ method: "POST",
2930
+ body: JSON.stringify({
2931
+ instanceId: targetInstanceId,
2932
+ dryRun: hasFlag(ctx, "dry-run")
2933
+ })
2934
+ });
2935
+ }
2936
+ if (action === "delete" || action === "delete-task") {
2937
+ const entryId = maybeArg ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2938
+ if (!entryId)
2939
+ throw new CliError("Missing governance entry id", 2);
2940
+ requireGovernanceTaskDeleteConfirmation(entryId, ctx);
2941
+ return requestApi(`/api/cli/governance/tasks/${entryId}/delete`, {
2942
+ method: "POST",
2943
+ body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
2944
+ });
2945
+ }
2946
+ throw new CliError(`Unknown governance command "${action}"`, 2);
2947
+ };
2948
+ var runGovernanceTaskCommentsCommand = async (action, id, ctx) => {
2949
+ if (!action || action === "help")
2950
+ return governanceCommentsHelp();
2951
+ if (action === "list") {
2952
+ const entryId = id ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2953
+ if (!entryId)
2954
+ throw new CliError("Missing governance entry id", 2);
2955
+ return requestApi(`/api/cli/governance/comments/${entryId}`);
2956
+ }
2957
+ if (action === "add") {
2958
+ requireWriteConfirmation("Governance comment creation writes data. Add --yes or use --dry-run.", ctx);
2959
+ const entryId = id ?? getStringFlag(ctx, "entry") ?? getStringFlag(ctx, "entry-id");
2960
+ if (!entryId)
2961
+ throw new CliError("Missing governance entry id", 2);
2962
+ const content = await getTextFlag(ctx, "content", "content-file");
2963
+ if (!content)
2964
+ throw new CliError("Missing --content or --content-file", 2);
2965
+ return requestApi(`/api/cli/governance/comments/${entryId}`, {
2966
+ method: "POST",
2967
+ body: JSON.stringify({
2968
+ content,
2969
+ dryRun: hasFlag(ctx, "dry-run")
2970
+ })
2971
+ });
2972
+ }
2973
+ if (action === "delete") {
2974
+ requireWriteConfirmation("Governance comment deletion writes data. Add --yes or use --dry-run.", ctx);
2975
+ const commentId = id ?? getStringFlag(ctx, "comment") ?? getStringFlag(ctx, "comment-id");
2976
+ if (!commentId)
2977
+ throw new CliError("Missing comment id", 2);
2978
+ return requestApi(`/api/cli/governance/comments/${commentId}/delete`, {
2979
+ method: "POST",
2980
+ body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
2981
+ });
2982
+ }
2983
+ throw new CliError(`Unknown governance comments command "${action}"`, 2);
2984
+ };
2985
+ var runPageCommentsCommand = async (action, id, ctx) => {
2986
+ if (!action || action === "help")
2987
+ return pageCommentsHelp();
2988
+ if (action === "list") {
2989
+ const pageId = id ?? getStringFlag(ctx, "page") ?? getStringFlag(ctx, "page-id");
2990
+ if (!pageId)
2991
+ throw new CliError("Missing page id", 2);
2992
+ return requestApi(`/api/cli/page-comments/${pageId}`);
2993
+ }
2994
+ if (action === "add") {
2995
+ requireWriteConfirmation("Page comment creation writes data. Add --yes or use --dry-run.", ctx);
2996
+ const pageId = id ?? getStringFlag(ctx, "page") ?? getStringFlag(ctx, "page-id");
2997
+ if (!pageId)
2998
+ throw new CliError("Missing page id", 2);
2999
+ const content = await getTextFlag(ctx, "content", "content-file");
3000
+ if (!content)
3001
+ throw new CliError("Missing --content or --content-file", 2);
3002
+ const anchorQuote = await getTextFlag(ctx, "anchor-quote", "anchor-quote-file");
3003
+ return requestApi(`/api/cli/page-comments/${pageId}`, {
3004
+ method: "POST",
3005
+ body: JSON.stringify({
3006
+ content,
3007
+ blockId: getStringFlag(ctx, "block-id"),
3008
+ anchorQuote,
3009
+ createTask: hasFlag(ctx, "create-task"),
3010
+ dryRun: hasFlag(ctx, "dry-run")
3011
+ })
3012
+ });
3013
+ }
3014
+ if (action === "reply") {
3015
+ requireWriteConfirmation("Page comment reply writes data. Add --yes or use --dry-run.", ctx);
3016
+ const parentId = id ?? getStringFlag(ctx, "parent") ?? getStringFlag(ctx, "parent-id");
3017
+ if (!parentId)
3018
+ throw new CliError("Missing parent comment id", 2);
3019
+ const content = await getTextFlag(ctx, "content", "content-file");
3020
+ if (!content)
3021
+ throw new CliError("Missing --content or --content-file", 2);
3022
+ return requestApi(`/api/cli/page-comments/${parentId}/reply`, {
3023
+ method: "POST",
3024
+ body: JSON.stringify({
3025
+ content,
3026
+ dryRun: hasFlag(ctx, "dry-run")
3027
+ })
3028
+ });
3029
+ }
3030
+ if (action === "resolve" || action === "reopen" || action === "delete") {
3031
+ requireWriteConfirmation(`Page comment ${action} writes data. Add --yes or use --dry-run.`, ctx);
3032
+ const commentId = id ?? getStringFlag(ctx, "comment") ?? getStringFlag(ctx, "comment-id");
3033
+ if (!commentId)
3034
+ throw new CliError("Missing comment id", 2);
3035
+ return requestApi(`/api/cli/page-comments/${commentId}/${action}`, {
3036
+ method: "POST",
3037
+ body: JSON.stringify({ dryRun: hasFlag(ctx, "dry-run") })
3038
+ });
3039
+ }
3040
+ throw new CliError(`Unknown page-comments command "${action}"`, 2);
3041
+ };
3042
+ var governanceScope = (ctx) => {
3043
+ const instanceId = getStringFlag(ctx, "instance") ?? "global";
3044
+ const searchParams = new URLSearchParams;
3045
+ searchParams.set("instanceId", instanceId);
3046
+ if (hasFlag(ctx, "all-instances") || instanceId === "global" && !hasFlag(ctx, "scoped")) {
3047
+ searchParams.set("viewAllInstances", "true");
3048
+ }
3049
+ return searchParams;
3050
+ };
3051
+ var governanceBoardSearchParams = async (ctx, mode) => {
3052
+ const searchParams = governanceScope(ctx);
3053
+ searchParams.set("filters", JSON.stringify(await governanceFilters(ctx, mode)));
3054
+ searchParams.set("sort", JSON.stringify(governanceSort(ctx, mode)));
3055
+ searchParams.set("page", String(getNumberFlag(ctx, "page") ?? 1));
3056
+ searchParams.set("pageSize", String(getNumberFlag(ctx, "page-size") ?? getNumberFlag(ctx, "pageSize") ?? 25));
3057
+ return searchParams;
3058
+ };
3059
+ var governanceFilters = async (ctx, mode) => {
3060
+ const filters = await parseJsonObjectFlag(ctx, "filters", "filters-file");
3061
+ const search = getStringFlag(ctx, "search") ?? getStringFlag(ctx, "query");
3062
+ if (search)
3063
+ filters.search = search;
3064
+ const formatLevel1 = splitCsv(getStringFlag(ctx, "format") ?? getStringFlag(ctx, "format-level-1"));
3065
+ if (formatLevel1.length)
3066
+ filters.formatLevel1 = formatLevel1;
3067
+ const appSlugs = splitCsv(getStringFlag(ctx, "apps") ?? getStringFlag(ctx, "app-slugs"));
3068
+ if (appSlugs.length)
3069
+ filters.appSlugs = appSlugs;
3070
+ if (hasFlag(ctx, "mine") || hasFlag(ctx, "only-mine"))
3071
+ filters.onlyMine = true;
3072
+ if (mode === "tasks") {
3073
+ const entityTypes = splitCsv(getStringFlag(ctx, "entity-types") ?? getStringFlag(ctx, "types"));
3074
+ if (entityTypes.length)
3075
+ filters.entityTypes = entityTypes;
3076
+ const lifecycle = splitCsv(getStringFlag(ctx, "lifecycle"));
3077
+ if (lifecycle.length)
3078
+ filters.lifecycle = lifecycle;
3079
+ const statuses = splitCsv(getStringFlag(ctx, "statuses") ?? getStringFlag(ctx, "status"));
3080
+ if (statuses.length)
3081
+ filters.statuses = statuses;
3082
+ const classifications = splitCsv(getStringFlag(ctx, "classifications") ?? getStringFlag(ctx, "classification"));
3083
+ if (classifications.length)
3084
+ filters.classifications = classifications;
3085
+ const plans = splitCsv(getStringFlag(ctx, "plans") ?? getStringFlag(ctx, "plan"));
3086
+ if (plans.length)
3087
+ filters.plans = plans;
3088
+ const assigneeId = getStringFlag(ctx, "assignee") ?? getStringFlag(ctx, "assignee-id");
3089
+ if (assigneeId)
3090
+ filters.assigneeId = assigneeId;
3091
+ if (hasFlag(ctx, "revision-due") || hasFlag(ctx, "only-revision-due")) {
3092
+ filters.onlyRevisionDue = true;
3093
+ }
3094
+ }
3095
+ return filters;
3096
+ };
3097
+ var governanceSort = (ctx, mode) => ({
3098
+ key: getStringFlag(ctx, "sort-key") ?? getStringFlag(ctx, "sort") ?? (mode === "tasks" ? "lastUpdatedAt" : "lastUpdatedAt"),
3099
+ direction: getStringFlag(ctx, "sort-direction") ?? getStringFlag(ctx, "direction") ?? "desc"
3100
+ });
3101
+ var governanceTaskInput = async (ctx) => {
3102
+ const entityType = getStringFlag(ctx, "entity-type") ?? getStringFlag(ctx, "type");
3103
+ const entityId = getStringFlag(ctx, "entity-id");
3104
+ if (!entityType)
3105
+ throw new CliError("Missing --entity-type", 2);
3106
+ if (!entityId)
3107
+ throw new CliError("Missing --entity-id", 2);
3108
+ const taskTitle = await getTextFlag(ctx, "task-title", "task-title-file") ?? await getTextFlag(ctx, "title", "title-file");
3109
+ return {
3110
+ entityType,
3111
+ entityId,
3112
+ instanceId: getStringFlag(ctx, "instance") ?? null,
3113
+ status: getStringFlag(ctx, "status"),
3114
+ revisionClassification: getStringFlag(ctx, "classification") ?? getStringFlag(ctx, "revision-classification"),
3115
+ dueDate: getStringFlag(ctx, "due-date") ?? getStringFlag(ctx, "due"),
3116
+ taskTitle
3117
+ };
3118
+ };
3119
+ var requireGovernanceTaskDeleteConfirmation = (entryId, ctx) => {
3120
+ const expectedConfirmation = `governance:${entryId}`;
3121
+ if (!hasFlag(ctx, "force")) {
3122
+ throw new CliError("Governance task delete requires --force", 2, {
3123
+ entryId,
3124
+ requiredConfirmation: expectedConfirmation
3125
+ });
3126
+ }
3127
+ if (getStringFlag(ctx, "confirm-delete") !== expectedConfirmation) {
3128
+ throw new CliError(`Governance task delete requires --confirm-delete ${expectedConfirmation}`, 2, {
3129
+ entryId,
3130
+ requiredConfirmation: expectedConfirmation
3131
+ });
3132
+ }
3133
+ requireWriteConfirmation("Governance task delete writes data. Add --yes or use --dry-run.", ctx);
3134
+ };
2557
3135
  var runKnowledgeSyncMediaCommand = async (ctx) => {
2558
3136
  const targetInstanceIds = getTargetInstanceIds(ctx);
2559
3137
  const allTargets = hasFlag(ctx, "all-targets");
@@ -3113,7 +3691,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3113
3691
  dryRun: hasFlag(ctx, "dry-run")
3114
3692
  };
3115
3693
  if (hasFlag(ctx, "dry-run"))
3116
- return { operation: "imported-sheets.copy-to", importedSheetId, ...payload };
3694
+ return {
3695
+ operation: "imported-sheets.copy-to",
3696
+ importedSheetId,
3697
+ ...payload
3698
+ };
3117
3699
  return requestApi(`/api/cli/imported-sheets/${importedSheetId}/copy-to`, {
3118
3700
  method: "POST",
3119
3701
  body: JSON.stringify(payload)
@@ -3135,7 +3717,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3135
3717
  dryRun: hasFlag(ctx, "dry-run")
3136
3718
  };
3137
3719
  if (hasFlag(ctx, "dry-run"))
3138
- return { operation: "imported-sheets.attach-page", importedSheetId, ...payload };
3720
+ return {
3721
+ operation: "imported-sheets.attach-page",
3722
+ importedSheetId,
3723
+ ...payload
3724
+ };
3139
3725
  return requestApi(`/api/cli/imported-sheets/${importedSheetId}/attach-page`, {
3140
3726
  method: "POST",
3141
3727
  body: JSON.stringify(payload)
@@ -3163,7 +3749,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3163
3749
  dryRun: hasFlag(ctx, "dry-run")
3164
3750
  };
3165
3751
  if (hasFlag(ctx, "dry-run"))
3166
- return { operation: "imported-sheets.set-source", importedSheetId, ...payload };
3752
+ return {
3753
+ operation: "imported-sheets.set-source",
3754
+ importedSheetId,
3755
+ ...payload
3756
+ };
3167
3757
  return requestImportedSheetApi(ctx, instanceId, "set-source", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/source`, {
3168
3758
  method: "POST",
3169
3759
  body: JSON.stringify(payload)
@@ -3192,7 +3782,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3192
3782
  if (action === "create") {
3193
3783
  const payload = await importedSheetCreatePayload(ctx);
3194
3784
  if (hasFlag(ctx, "dry-run"))
3195
- return { dryRun: true, operation: "imported-sheets.create", payload };
3785
+ return {
3786
+ dryRun: true,
3787
+ operation: "imported-sheets.create",
3788
+ payload
3789
+ };
3196
3790
  return requestImportedSheetApi(ctx, instanceId, "create", () => requestApi("/api/cli/imported-sheets", {
3197
3791
  method: "POST",
3198
3792
  body: JSON.stringify(payload)
@@ -3216,7 +3810,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3216
3810
  if (Object.keys(payload.data).length === 0)
3217
3811
  throw new CliError("Missing --data or --data-file JSON", 2);
3218
3812
  if (hasFlag(ctx, "dry-run"))
3219
- return { operation: "imported-sheets.update", importedSheetId, ...payload };
3813
+ return {
3814
+ operation: "imported-sheets.update",
3815
+ importedSheetId,
3816
+ ...payload
3817
+ };
3220
3818
  return requestImportedSheetApi(ctx, instanceId, "update", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}`, {
3221
3819
  method: "PATCH",
3222
3820
  body: JSON.stringify(payload)
@@ -3229,7 +3827,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3229
3827
  dryRun: hasFlag(ctx, "dry-run")
3230
3828
  };
3231
3829
  if (hasFlag(ctx, "dry-run"))
3232
- return { operation: "imported-sheets.sync", importedSheetId, ...payload };
3830
+ return {
3831
+ operation: "imported-sheets.sync",
3832
+ importedSheetId,
3833
+ ...payload
3834
+ };
3233
3835
  return requestImportedSheetApi(ctx, instanceId, "sync", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/sync`, {
3234
3836
  method: "POST",
3235
3837
  body: JSON.stringify(payload)
@@ -3248,7 +3850,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3248
3850
  dryRun: hasFlag(ctx, "dry-run")
3249
3851
  };
3250
3852
  if (hasFlag(ctx, "dry-run"))
3251
- return { operation: `imported-sheets.${action}`, importedSheetId, ...payload };
3853
+ return {
3854
+ operation: `imported-sheets.${action}`,
3855
+ importedSheetId,
3856
+ ...payload
3857
+ };
3252
3858
  return requestImportedSheetApi(ctx, instanceId, action, () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/translate`, {
3253
3859
  method: "POST",
3254
3860
  body: JSON.stringify(payload)
@@ -3269,7 +3875,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3269
3875
  dryRun: hasFlag(ctx, "dry-run")
3270
3876
  };
3271
3877
  if (hasFlag(ctx, "dry-run"))
3272
- return { operation: "imported-sheets.retranslate", importedSheetId, ...payload };
3878
+ return {
3879
+ operation: "imported-sheets.retranslate",
3880
+ importedSheetId,
3881
+ ...payload
3882
+ };
3273
3883
  return requestImportedSheetApi(ctx, instanceId, "retranslate", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/retranslate`, {
3274
3884
  method: "POST",
3275
3885
  body: JSON.stringify(payload)
@@ -3291,7 +3901,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3291
3901
  dryRun: hasFlag(ctx, "dry-run")
3292
3902
  };
3293
3903
  if (hasFlag(ctx, "dry-run"))
3294
- return { operation: "imported-sheets.replace-grid", importedSheetId, ...payload };
3904
+ return {
3905
+ operation: "imported-sheets.replace-grid",
3906
+ importedSheetId,
3907
+ ...payload
3908
+ };
3295
3909
  return requestImportedSheetApi(ctx, instanceId, "replace-grid", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/replace-grid`, {
3296
3910
  method: "POST",
3297
3911
  body: JSON.stringify(payload)
@@ -3322,7 +3936,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3322
3936
  dryRun: hasFlag(ctx, "dry-run")
3323
3937
  };
3324
3938
  if (hasFlag(ctx, "dry-run"))
3325
- return { operation: "imported-sheets.vectorize", importedSheetId, ...payload };
3939
+ return {
3940
+ operation: "imported-sheets.vectorize",
3941
+ importedSheetId,
3942
+ ...payload
3943
+ };
3326
3944
  return requestImportedSheetApi(ctx, instanceId, "vectorize", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/vectorize`, {
3327
3945
  method: "POST",
3328
3946
  body: JSON.stringify(payload)
@@ -3336,7 +3954,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3336
3954
  dryRun: hasFlag(ctx, "dry-run")
3337
3955
  };
3338
3956
  if (hasFlag(ctx, "dry-run"))
3339
- return { operation: "imported-sheets.repair-french", importedSheetId, ...payload };
3957
+ return {
3958
+ operation: "imported-sheets.repair-french",
3959
+ importedSheetId,
3960
+ ...payload
3961
+ };
3340
3962
  return requestImportedSheetApi(ctx, instanceId, "repair-french", () => requestApi(`/api/cli/imported-sheets/${importedSheetId}/repair-french`, {
3341
3963
  method: "POST",
3342
3964
  body: JSON.stringify(payload)
@@ -3358,7 +3980,11 @@ var runImportedSheetsCommand = async (action, importedSheetId, ctx) => {
3358
3980
  dryRun: hasFlag(ctx, "dry-run")
3359
3981
  };
3360
3982
  if (hasFlag(ctx, "dry-run"))
3361
- return { operation: "imported-sheets.delete", importedSheetId, ...payload };
3983
+ return {
3984
+ operation: "imported-sheets.delete",
3985
+ importedSheetId,
3986
+ ...payload
3987
+ };
3362
3988
  return requestApi(`/api/cli/imported-sheets/${importedSheetId}`, {
3363
3989
  method: "DELETE",
3364
3990
  body: JSON.stringify(payload)
@@ -3513,10 +4139,7 @@ var syncPresetItems = (preset) => {
3513
4139
  var getTargetInstanceIds = (ctx) => {
3514
4140
  const explicitTargets = splitCsv(getStringFlag(ctx, "targets"));
3515
4141
  const target = getStringFlag(ctx, "target");
3516
- return Array.from(new Set([
3517
- ...explicitTargets,
3518
- ...target ? [target] : []
3519
- ]));
4142
+ return Array.from(new Set([...explicitTargets, ...target ? [target] : []]));
3520
4143
  };
3521
4144
  var getFields = (resource, ctx) => splitCsv(getStringFlag(ctx, "fields")).length > 0 ? splitCsv(getStringFlag(ctx, "fields")) : resource.defaultFields;
3522
4145
  var entitySearchParams = (ctx) => {
@@ -3715,11 +4338,7 @@ var GLOBAL_DEFAULT_RESOURCES = new Set([
3715
4338
  var defaultInstanceId = (resource) => GLOBAL_DEFAULT_RESOURCES.has(resource.name) ? "global" : undefined;
3716
4339
  var skillsSourceRootDir = async () => {
3717
4340
  const currentDir = dirname2(fileURLToPath(import.meta.url));
3718
- const candidates = [
3719
- join2(currentDir, "..", "skills"),
3720
- join2(process.cwd(), "packages", "gskills-admin-cli", "skills"),
3721
- join2(process.cwd(), ".codex", "skills")
3722
- ];
4341
+ const candidates = [join2(currentDir, "..", "skills"), join2(process.cwd(), "packages", "gskills-admin-cli", "skills"), join2(process.cwd(), ".codex", "skills")];
3723
4342
  for (const candidate of candidates) {
3724
4343
  try {
3725
4344
  if ((await stat(candidate)).isDirectory())
@@ -3814,10 +4433,17 @@ var rootHelp = () => ({
3814
4433
  "gskills-admin imported-sheets create --instance <id> --source <url> --tab <name> --default-locale en --locales fr,en --owner-email admin@example.com --enable-vectorization --dry-run",
3815
4434
  `gskills-admin internal-knowledge create --instance <instanceId> --upload-file ./video.mp4 --data '{"title":"...","language":"fr"}' --yes`,
3816
4435
  `gskills-admin resources create --instance <instanceId> --upload-file ./webinar.mp4 --data '{"title":"...","type":"WEBINAR","language":"fr"}' --yes`,
4436
+ "gskills-admin learning-paths icons --query Gmail",
4437
+ "gskills-admin learning-paths set-icon <id> --app Gmail --yes",
4438
+ "gskills-admin learning-paths set-icon <id> --upload-file ./icon.png --yes",
4439
+ "gskills-admin learning-paths generate-icon <id> --prompt 'flat handshake, transparent background' --yes",
3817
4440
  "gskills-admin internal-knowledge sync-media --since today --languages fr --all-targets --dry-run",
3818
4441
  "gskills-admin progress learning-path-quiz-mismatches --instance <instanceId>",
3819
4442
  "gskills-admin sessions invalidate --email user@example.com --dry-run",
3820
- "gskills-admin content-assistant lookup --query 'draft'"
4443
+ "gskills-admin content-assistant lookup --query 'draft'",
4444
+ "gskills-admin governance list --instance global --output json",
4445
+ "gskills-admin governance create-task --entity-type page --entity-id <pageId> --status TODO --dry-run",
4446
+ "gskills-admin page-comments add <pageId> --content-file ./comment.txt --block-id <blockId> --create-task --dry-run"
3821
4447
  ],
3822
4448
  resources: resources.map((resource) => resource.name),
3823
4449
  output: "Use --output json, --output jsonl, --output table, or --output markdown. Piped output defaults to JSON.",
@@ -3833,7 +4459,11 @@ var schemaHelp = () => ({
3833
4459
  authorization: "GSkills re-checks User.adminState = SUPER_ADMIN on every request"
3834
4460
  },
3835
4461
  globalFlags: [
3836
- { name: "output", values: ["json", "jsonl", "table", "markdown"], default: "auto" },
4462
+ {
4463
+ name: "output",
4464
+ values: ["json", "jsonl", "table", "markdown"],
4465
+ default: "auto"
4466
+ },
3837
4467
  { name: "quiet", type: "boolean" }
3838
4468
  ],
3839
4469
  commands: [
@@ -3843,78 +4473,657 @@ var schemaHelp = () => ({
3843
4473
  { name: "resources", writes: false },
3844
4474
  { name: "schema", writes: false },
3845
4475
  { name: "skills install", flags: ["--target"], writes: true },
3846
- { name: "sync diff", required: ["--target or --targets"], writes: false },
3847
- { name: "sync run", required: ["--target or --targets"], safety: ["--yes or --dry-run"], writes: true },
3848
- { name: "sync logs", flags: ["--target", "--source", "--status", "--take"], writes: false },
4476
+ {
4477
+ name: "sync diff",
4478
+ required: ["--target or --targets"],
4479
+ writes: false
4480
+ },
4481
+ {
4482
+ name: "sync run",
4483
+ required: ["--target or --targets"],
4484
+ safety: ["--yes or --dry-run"],
4485
+ writes: true
4486
+ },
4487
+ {
4488
+ name: "sync logs",
4489
+ flags: ["--target", "--source", "--status", "--take"],
4490
+ writes: false
4491
+ },
3849
4492
  { name: "sync presets", writes: false },
3850
- { name: "sync repair-source-links", required: ["--target"], flags: ["--source", "--yes", "--dry-run"], writes: true },
4493
+ {
4494
+ name: "sync repair-source-links",
4495
+ required: ["--target"],
4496
+ flags: ["--source", "--yes", "--dry-run"],
4497
+ writes: true
4498
+ },
3851
4499
  { name: "cache scopes", writes: false },
3852
- { name: "cache invalidate", required: ["--instance"], flags: ["--scope", "--languages", "--yes", "--dry-run"], writes: true },
3853
- { name: "translate", args: ["kind", "id?"], required: ["--to"], flags: ["--ids", "--all", "--instance", "--from", "--where", "--take", "--mode", "--source-history", "--concurrency", "--yes", "--dry-run"], writes: true },
3854
- { name: "imported-sheets list", required: ["--instance"], writes: false },
3855
- { name: "imported-sheets get", args: ["id"], required: ["--instance"], flags: ["--locale", "--page", "--page-size"], writes: false },
3856
- { name: "imported-sheets locales", args: ["id"], required: ["--instance"], writes: false },
3857
- { name: "imported-sheets runs", args: ["id?"], required: ["--instance"], flags: ["--take"], writes: false },
3858
- { name: "imported-sheets resolve", required: ["--instance", "--source"], writes: false },
3859
- { name: "imported-sheets connect-google", required: ["--instance"], flags: ["--base-url", "--lang", "--owner-email", "--no-open", "--dry-run"], writes: false },
3860
- { name: "imported-sheets create", required: ["--instance", "--source", "--tab", "--owner-email or --owner-user"], flags: ["--display-name", "--locales", "--mode", "--default-locale", "--owner-email", "--owner-user", "--enable-vectorization", "--vector-headers", "--data", "--data-file", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"], writes: true },
3861
- { name: "imported-sheets update", args: ["id"], required: ["--instance", "--data or --data-file or --owner-email"], flags: ["--owner-email", "--owner-user", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"], writes: true },
3862
- { name: "imported-sheets sync", args: ["id"], required: ["--instance"], flags: ["--locales", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"], writes: true },
3863
- { name: "imported-sheets enable-locales", args: ["id"], required: ["--instance", "--locales"], flags: ["--yes", "--dry-run"], writes: true },
3864
- { name: "imported-sheets translate", args: ["id"], required: ["--instance", "--to"], flags: ["--yes", "--dry-run"], writes: true },
3865
- { name: "imported-sheets retranslate", args: ["id"], required: ["--instance", "--to"], flags: ["--from", "--revectorize", "--yes", "--dry-run"], writes: true },
3866
- { name: "imported-sheets replace-grid", args: ["id"], required: ["--instance", "--locale", "--data or --data-file"], flags: ["--rebuild-columns", "--revectorize", "--yes", "--dry-run"], writes: true },
3867
- { name: "imported-sheets patch-cells", args: ["id"], required: ["--instance", "--data or --data-file"], flags: ["--locale", "--revectorize", "--cache-scope", "--no-cache", "--yes", "--dry-run"], writes: true },
3868
- { name: "imported-sheets vectorize", args: ["id"], required: ["--instance"], flags: ["--locales", "--yes", "--dry-run"], writes: true },
3869
- { name: "imported-sheets repair-french", args: ["id"], required: ["--instance"], flags: ["--locales", "--revectorize", "--yes", "--dry-run"], writes: true },
3870
- { name: "imported-sheets copy-to", args: ["id"], required: ["--instance", "--target or --targets"], flags: ["--display-name", "--replace", "--revectorize", "--yes", "--dry-run"], writes: true },
3871
- { name: "imported-sheets attach-page", args: ["id"], required: ["--instance", "--page"], flags: ["--locale", "--position", "--replace-existing", "--yes", "--dry-run"], writes: true },
3872
- { name: "imported-sheets set-source", args: ["id"], required: ["--instance", "--locale", "--source", "--tab"], flags: ["--resync", "--yes", "--dry-run"], writes: true },
3873
- { name: "imported-sheets delete", args: ["id"], required: ["--instance", "--force", "--confirm-delete"], flags: ["--yes", "--dry-run"], writes: true, destructive: true },
3874
- { name: "internal-knowledge sync-media", flags: ["--source", "--target", "--targets", "--all-targets", "--languages", "--since", "--updated-after", "--fields", "--mime", "--source-type", "--include-disabled", "--include-archived", "--no-cache", "--yes", "--dry-run"], writes: true },
3875
- { name: "pages backfill-field", required: ["--field", "--target or --targets or --all-targets"], flags: ["--source", "--languages", "--no-cache", "--yes", "--dry-run"], writes: true },
3876
- { name: "pages content-schema", aliases: ["pages blocks", "pages block-schema"], writes: false },
3877
- { name: "pages patch-content", args: ["id"], required: ["--patch or --patch-file", "--yes or --dry-run"], flags: ["--reason", "--expect-updated-at", "--expect-version", "--expect-content-sha1"], writes: true },
3878
- { name: "pages block list", args: ["id"], flags: ["--include-content"], writes: false },
3879
- { name: "pages block get", args: ["id"], required: ["--block-id"], flags: ["--include-content"], writes: false },
3880
- { name: "pages block replace-text", args: ["id"], required: ["--block-id", "--text or --text-file", "--yes or --dry-run"], flags: ["--field", "--expect-text", "--expect-text-file", "--expect-type", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"], writes: true },
3881
- { name: "pages block replace", args: ["id"], required: ["--block-id", "--block or --block-file", "--yes or --dry-run"], flags: ["--expect-type", "--allow-id-change", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"], writes: true },
3882
- { name: "pages block insert-before", args: ["id"], required: ["--block-id", "--block or --block-file", "--yes or --dry-run"], flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"], writes: true },
3883
- { name: "pages block insert-after", args: ["id"], required: ["--block-id", "--block or --block-file", "--yes or --dry-run"], flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"], writes: true },
3884
- { name: "pages block remove", args: ["id"], required: ["--block-id", "--yes or --dry-run"], flags: ["--expect-type", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"], writes: true },
3885
- { name: "feedback inspect", args: ["feedbackId or URL"], writes: false },
3886
- { name: "feedback translation-status", args: ["feedbackId or URL"], writes: false },
3887
- { name: "feedback import-email", flags: ["--data", "--data-file", "--yes", "--dry-run"], writes: true },
3888
- { name: "feedback claim", args: ["feedbackId"], flags: ["--dry-run"], writes: true },
3889
- { name: "feedback send-claim", args: ["feedbackId"], flags: ["--recipient-email", "--recipient-name", "--cc", "--subject", "--body", "--yes", "--dry-run"], writes: true },
3890
- { name: "feedback send-reply", args: ["feedbackId"], flags: ["--subject", "--subject-file", "--body-file", "--translated-subject", "--translated-subject-file", "--translated-body-file", "--user-language", "--current-language", "--yes", "--dry-run"], writes: true },
3891
- { name: "progress learning-path-quiz-mismatches", flags: ["--instance", "--learning-path", "--user", "--limit"], writes: false },
3892
- { name: "progress repair-learning-path-quiz-mismatches", flags: ["--instance", "--learning-path", "--user", "--limit", "--yes", "--dry-run"], writes: true },
3893
- { name: "progress embedded-course", required: ["--user", "--quiz", "--page"], flags: ["--yes", "--dry-run"], writes: true },
3894
- { name: "access diagnose", required: ["--user or --email"], flags: ["--instance"], writes: false },
3895
- { name: "access grant", required: ["--user"], flags: ["--type", "--start-at", "--custom-duration-days", "--preferred-language", "--yes", "--dry-run"], writes: true },
3896
- { name: "access revoke-active", required: ["--user"], flags: ["--yes", "--dry-run"], writes: true },
3897
- { name: "sessions invalidate", required: ["--user or --users or --email or --emails"], flags: ["--instance", "--reason", "--yes", "--dry-run"], writes: true },
3898
- { name: "content-assistant lookup", flags: ["--chat", "--user", "--email", "--query", "--take"], writes: false },
3899
- { name: "admin-ingest repair-state", required: ["--instance"], writes: false },
3900
- { name: "admin-ingest repair", required: ["--instance"], flags: ["--yes", "--dry-run"], writes: true },
4500
+ {
4501
+ name: "cache invalidate",
4502
+ required: ["--instance"],
4503
+ flags: ["--scope", "--languages", "--yes", "--dry-run"],
4504
+ writes: true
4505
+ },
4506
+ {
4507
+ name: "translate",
4508
+ args: ["kind", "id?"],
4509
+ required: ["--to"],
4510
+ flags: ["--ids", "--all", "--instance", "--from", "--where", "--take", "--mode", "--source-history", "--concurrency", "--yes", "--dry-run"],
4511
+ writes: true
4512
+ },
4513
+ {
4514
+ name: "imported-sheets list",
4515
+ required: ["--instance"],
4516
+ writes: false
4517
+ },
4518
+ {
4519
+ name: "imported-sheets get",
4520
+ args: ["id"],
4521
+ required: ["--instance"],
4522
+ flags: ["--locale", "--page", "--page-size"],
4523
+ writes: false
4524
+ },
4525
+ {
4526
+ name: "imported-sheets locales",
4527
+ args: ["id"],
4528
+ required: ["--instance"],
4529
+ writes: false
4530
+ },
4531
+ {
4532
+ name: "imported-sheets runs",
4533
+ args: ["id?"],
4534
+ required: ["--instance"],
4535
+ flags: ["--take"],
4536
+ writes: false
4537
+ },
4538
+ {
4539
+ name: "imported-sheets resolve",
4540
+ required: ["--instance", "--source"],
4541
+ writes: false
4542
+ },
4543
+ {
4544
+ name: "imported-sheets connect-google",
4545
+ required: ["--instance"],
4546
+ flags: ["--base-url", "--lang", "--owner-email", "--no-open", "--dry-run"],
4547
+ writes: false
4548
+ },
4549
+ {
4550
+ name: "imported-sheets create",
4551
+ required: ["--instance", "--source", "--tab", "--owner-email or --owner-user"],
4552
+ flags: [
4553
+ "--display-name",
4554
+ "--locales",
4555
+ "--mode",
4556
+ "--default-locale",
4557
+ "--owner-email",
4558
+ "--owner-user",
4559
+ "--enable-vectorization",
4560
+ "--vector-headers",
4561
+ "--data",
4562
+ "--data-file",
4563
+ "--oauth-timeout-ms",
4564
+ "--no-oauth-wait",
4565
+ "--yes",
4566
+ "--dry-run"
4567
+ ],
4568
+ writes: true
4569
+ },
4570
+ {
4571
+ name: "imported-sheets update",
4572
+ args: ["id"],
4573
+ required: ["--instance", "--data or --data-file or --owner-email"],
4574
+ flags: ["--owner-email", "--owner-user", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"],
4575
+ writes: true
4576
+ },
4577
+ {
4578
+ name: "imported-sheets sync",
4579
+ args: ["id"],
4580
+ required: ["--instance"],
4581
+ flags: ["--locales", "--oauth-timeout-ms", "--no-oauth-wait", "--yes", "--dry-run"],
4582
+ writes: true
4583
+ },
4584
+ {
4585
+ name: "imported-sheets enable-locales",
4586
+ args: ["id"],
4587
+ required: ["--instance", "--locales"],
4588
+ flags: ["--yes", "--dry-run"],
4589
+ writes: true
4590
+ },
4591
+ {
4592
+ name: "imported-sheets translate",
4593
+ args: ["id"],
4594
+ required: ["--instance", "--to"],
4595
+ flags: ["--yes", "--dry-run"],
4596
+ writes: true
4597
+ },
4598
+ {
4599
+ name: "imported-sheets retranslate",
4600
+ args: ["id"],
4601
+ required: ["--instance", "--to"],
4602
+ flags: ["--from", "--revectorize", "--yes", "--dry-run"],
4603
+ writes: true
4604
+ },
4605
+ {
4606
+ name: "imported-sheets replace-grid",
4607
+ args: ["id"],
4608
+ required: ["--instance", "--locale", "--data or --data-file"],
4609
+ flags: ["--rebuild-columns", "--revectorize", "--yes", "--dry-run"],
4610
+ writes: true
4611
+ },
4612
+ {
4613
+ name: "imported-sheets patch-cells",
4614
+ args: ["id"],
4615
+ required: ["--instance", "--data or --data-file"],
4616
+ flags: ["--locale", "--revectorize", "--cache-scope", "--no-cache", "--yes", "--dry-run"],
4617
+ writes: true
4618
+ },
4619
+ {
4620
+ name: "imported-sheets vectorize",
4621
+ args: ["id"],
4622
+ required: ["--instance"],
4623
+ flags: ["--locales", "--yes", "--dry-run"],
4624
+ writes: true
4625
+ },
4626
+ {
4627
+ name: "imported-sheets repair-french",
4628
+ args: ["id"],
4629
+ required: ["--instance"],
4630
+ flags: ["--locales", "--revectorize", "--yes", "--dry-run"],
4631
+ writes: true
4632
+ },
4633
+ {
4634
+ name: "imported-sheets copy-to",
4635
+ args: ["id"],
4636
+ required: ["--instance", "--target or --targets"],
4637
+ flags: ["--display-name", "--replace", "--revectorize", "--yes", "--dry-run"],
4638
+ writes: true
4639
+ },
4640
+ {
4641
+ name: "imported-sheets attach-page",
4642
+ args: ["id"],
4643
+ required: ["--instance", "--page"],
4644
+ flags: ["--locale", "--position", "--replace-existing", "--yes", "--dry-run"],
4645
+ writes: true
4646
+ },
4647
+ {
4648
+ name: "imported-sheets set-source",
4649
+ args: ["id"],
4650
+ required: ["--instance", "--locale", "--source", "--tab"],
4651
+ flags: ["--resync", "--yes", "--dry-run"],
4652
+ writes: true
4653
+ },
4654
+ {
4655
+ name: "imported-sheets delete",
4656
+ args: ["id"],
4657
+ required: ["--instance", "--force", "--confirm-delete"],
4658
+ flags: ["--yes", "--dry-run"],
4659
+ writes: true,
4660
+ destructive: true
4661
+ },
4662
+ {
4663
+ name: "internal-knowledge sync-media",
4664
+ flags: [
4665
+ "--source",
4666
+ "--target",
4667
+ "--targets",
4668
+ "--all-targets",
4669
+ "--languages",
4670
+ "--since",
4671
+ "--updated-after",
4672
+ "--fields",
4673
+ "--mime",
4674
+ "--source-type",
4675
+ "--include-disabled",
4676
+ "--include-archived",
4677
+ "--no-cache",
4678
+ "--yes",
4679
+ "--dry-run"
4680
+ ],
4681
+ writes: true
4682
+ },
4683
+ {
4684
+ name: "pages backfill-field",
4685
+ required: ["--field", "--target or --targets or --all-targets"],
4686
+ flags: ["--source", "--languages", "--no-cache", "--yes", "--dry-run"],
4687
+ writes: true
4688
+ },
4689
+ {
4690
+ name: "pages content-schema",
4691
+ aliases: ["pages blocks", "pages block-schema"],
4692
+ writes: false
4693
+ },
4694
+ {
4695
+ name: "pages patch-content",
4696
+ args: ["id"],
4697
+ required: ["--patch or --patch-file", "--yes or --dry-run"],
4698
+ flags: ["--reason", "--expect-updated-at", "--expect-version", "--expect-content-sha1"],
4699
+ writes: true
4700
+ },
4701
+ {
4702
+ name: "pages block list",
4703
+ args: ["id"],
4704
+ flags: ["--include-content"],
4705
+ writes: false
4706
+ },
4707
+ {
4708
+ name: "pages block get",
4709
+ args: ["id"],
4710
+ required: ["--block-id"],
4711
+ flags: ["--include-content"],
4712
+ writes: false
4713
+ },
4714
+ {
4715
+ name: "pages block replace-text",
4716
+ args: ["id"],
4717
+ required: ["--block-id", "--text or --text-file", "--yes or --dry-run"],
4718
+ flags: [
4719
+ "--field",
4720
+ "--expect-text",
4721
+ "--expect-text-file",
4722
+ "--expect-type",
4723
+ "--expect-updated-at",
4724
+ "--expect-version",
4725
+ "--expect-content-sha1",
4726
+ "--reason",
4727
+ "--include-content"
4728
+ ],
4729
+ writes: true
4730
+ },
4731
+ {
4732
+ name: "pages block replace",
4733
+ args: ["id"],
4734
+ required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
4735
+ flags: ["--expect-type", "--allow-id-change", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
4736
+ writes: true
4737
+ },
4738
+ {
4739
+ name: "pages block insert-before",
4740
+ args: ["id"],
4741
+ required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
4742
+ flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
4743
+ writes: true
4744
+ },
4745
+ {
4746
+ name: "pages block insert-after",
4747
+ args: ["id"],
4748
+ required: ["--block-id", "--block or --block-file", "--yes or --dry-run"],
4749
+ flags: ["--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
4750
+ writes: true
4751
+ },
4752
+ {
4753
+ name: "pages block remove",
4754
+ args: ["id"],
4755
+ required: ["--block-id", "--yes or --dry-run"],
4756
+ flags: ["--expect-type", "--expect-updated-at", "--expect-version", "--expect-content-sha1", "--reason", "--include-content"],
4757
+ writes: true
4758
+ },
4759
+ {
4760
+ name: "learning-paths icons",
4761
+ flags: ["--query", "--take"],
4762
+ writes: false
4763
+ },
4764
+ {
4765
+ name: "learning-paths set-icon",
4766
+ args: ["id"],
4767
+ required: ["--app or --category or --upload-file", "--yes or --dry-run"],
4768
+ flags: ["--instance", "--app", "--category", "--upload-file", "--icon-file", "--upload-name", "--mime-type"],
4769
+ writes: true
4770
+ },
4771
+ {
4772
+ name: "learning-paths generate-icon",
4773
+ args: ["id"],
4774
+ required: ["--yes or --dry-run"],
4775
+ flags: ["--prompt", "--prompt-file", "--extra-prompt", "--app", "--category", "--app-name", "--use-app-icon"],
4776
+ writes: true
4777
+ },
4778
+ {
4779
+ name: "feedback inspect",
4780
+ args: ["feedbackId or URL"],
4781
+ writes: false
4782
+ },
4783
+ {
4784
+ name: "feedback translation-status",
4785
+ args: ["feedbackId or URL"],
4786
+ writes: false
4787
+ },
4788
+ {
4789
+ name: "feedback import-email",
4790
+ flags: ["--data", "--data-file", "--yes", "--dry-run"],
4791
+ writes: true
4792
+ },
4793
+ {
4794
+ name: "feedback claim",
4795
+ args: ["feedbackId"],
4796
+ flags: ["--dry-run"],
4797
+ writes: true
4798
+ },
4799
+ {
4800
+ name: "feedback send-claim",
4801
+ args: ["feedbackId"],
4802
+ flags: ["--recipient-email", "--recipient-name", "--cc", "--subject", "--body", "--yes", "--dry-run"],
4803
+ writes: true
4804
+ },
4805
+ {
4806
+ name: "feedback send-reply",
4807
+ args: ["feedbackId"],
4808
+ flags: [
4809
+ "--subject",
4810
+ "--subject-file",
4811
+ "--body-file",
4812
+ "--translated-subject",
4813
+ "--translated-subject-file",
4814
+ "--translated-body-file",
4815
+ "--user-language",
4816
+ "--current-language",
4817
+ "--yes",
4818
+ "--dry-run"
4819
+ ],
4820
+ writes: true
4821
+ },
4822
+ {
4823
+ name: "progress learning-path-quiz-mismatches",
4824
+ flags: ["--instance", "--learning-path", "--user", "--limit"],
4825
+ writes: false
4826
+ },
4827
+ {
4828
+ name: "progress repair-learning-path-quiz-mismatches",
4829
+ flags: ["--instance", "--learning-path", "--user", "--limit", "--yes", "--dry-run"],
4830
+ writes: true
4831
+ },
4832
+ {
4833
+ name: "progress embedded-course",
4834
+ required: ["--user", "--quiz", "--page"],
4835
+ flags: ["--yes", "--dry-run"],
4836
+ writes: true
4837
+ },
4838
+ {
4839
+ name: "access diagnose",
4840
+ required: ["--user or --email"],
4841
+ flags: ["--instance"],
4842
+ writes: false
4843
+ },
4844
+ {
4845
+ name: "access grant",
4846
+ required: ["--user"],
4847
+ flags: ["--type", "--start-at", "--custom-duration-days", "--preferred-language", "--yes", "--dry-run"],
4848
+ writes: true
4849
+ },
4850
+ {
4851
+ name: "access revoke-active",
4852
+ required: ["--user"],
4853
+ flags: ["--yes", "--dry-run"],
4854
+ writes: true
4855
+ },
4856
+ {
4857
+ name: "sessions invalidate",
4858
+ required: ["--user or --users or --email or --emails"],
4859
+ flags: ["--instance", "--reason", "--yes", "--dry-run"],
4860
+ writes: true
4861
+ },
4862
+ {
4863
+ name: "content-assistant lookup",
4864
+ flags: ["--chat", "--user", "--email", "--query", "--take"],
4865
+ writes: false
4866
+ },
4867
+ {
4868
+ name: "governance list",
4869
+ flags: [
4870
+ "--instance",
4871
+ "--all-instances",
4872
+ "--filters",
4873
+ "--filters-file",
4874
+ "--search",
4875
+ "--entity-types",
4876
+ "--format",
4877
+ "--apps",
4878
+ "--status",
4879
+ "--classification",
4880
+ "--assignee",
4881
+ "--mine",
4882
+ "--revision-due",
4883
+ "--sort-key",
4884
+ "--sort-direction",
4885
+ "--page",
4886
+ "--page-size"
4887
+ ],
4888
+ writes: false
4889
+ },
4890
+ {
4891
+ name: "governance get",
4892
+ args: ["entryId"],
4893
+ flags: ["--instance"],
4894
+ writes: false
4895
+ },
4896
+ {
4897
+ name: "governance comments-board",
4898
+ flags: [
4899
+ "--instance",
4900
+ "--all-instances",
4901
+ "--filters",
4902
+ "--filters-file",
4903
+ "--search",
4904
+ "--format",
4905
+ "--apps",
4906
+ "--mine",
4907
+ "--sort-key",
4908
+ "--sort-direction",
4909
+ "--page",
4910
+ "--page-size"
4911
+ ],
4912
+ writes: false
4913
+ },
4914
+ {
4915
+ name: "governance open-comment-count",
4916
+ flags: ["--instance", "--all-instances"],
4917
+ writes: false
4918
+ },
4919
+ {
4920
+ name: "governance search",
4921
+ required: ["--instance"],
4922
+ flags: ["--query"],
4923
+ writes: false
4924
+ },
4925
+ { name: "governance options", required: ["--instance"], writes: false },
4926
+ { name: "governance users", writes: false },
4927
+ { name: "governance instances", writes: false },
4928
+ {
4929
+ name: "governance create-task",
4930
+ required: ["--entity-type", "--entity-id", "--yes or --dry-run"],
4931
+ flags: ["--instance", "--status", "--classification", "--due-date", "--task-title", "--task-title-file"],
4932
+ writes: true
4933
+ },
4934
+ {
4935
+ name: "governance upsert",
4936
+ required: ["--entity-type", "--entity-id", "--yes or --dry-run"],
4937
+ flags: ["--instance", "--status", "--classification", "--due-date"],
4938
+ writes: true
4939
+ },
4940
+ {
4941
+ name: "governance update-task",
4942
+ args: ["entryId"],
4943
+ required: ["--task-title or --task-description", "--yes or --dry-run"],
4944
+ flags: ["--task-title", "--task-title-file", "--task-description", "--task-description-file"],
4945
+ writes: true
4946
+ },
4947
+ {
4948
+ name: "governance set-assignees",
4949
+ args: ["entryId?"],
4950
+ required: ["--user-ids or --users", "--yes or --dry-run"],
4951
+ flags: ["--entity-type", "--entity-id", "--instance"],
4952
+ writes: true
4953
+ },
4954
+ {
4955
+ name: "governance set-instance",
4956
+ args: ["entryId"],
4957
+ required: ["--target-instance or --clear", "--yes or --dry-run"],
4958
+ flags: ["--target", "--all-instances", "--clear"],
4959
+ writes: true
4960
+ },
4961
+ {
4962
+ name: "governance delete-task",
4963
+ args: ["entryId"],
4964
+ required: ["--force", "--confirm-delete", "--yes or --dry-run"],
4965
+ writes: true,
4966
+ destructive: true
4967
+ },
4968
+ { name: "governance comments list", args: ["entryId"], writes: false },
4969
+ {
4970
+ name: "governance comments add",
4971
+ args: ["entryId"],
4972
+ required: ["--content or --content-file", "--yes or --dry-run"],
4973
+ writes: true
4974
+ },
4975
+ {
4976
+ name: "governance comments delete",
4977
+ args: ["commentId"],
4978
+ required: ["--yes or --dry-run"],
4979
+ writes: true,
4980
+ destructive: true
4981
+ },
4982
+ { name: "page-comments list", args: ["pageId"], writes: false },
4983
+ {
4984
+ name: "page-comments add",
4985
+ args: ["pageId"],
4986
+ required: ["--content or --content-file", "--yes or --dry-run"],
4987
+ flags: ["--block-id", "--anchor-quote", "--anchor-quote-file", "--create-task"],
4988
+ writes: true
4989
+ },
4990
+ {
4991
+ name: "page-comments reply",
4992
+ args: ["parentCommentId"],
4993
+ required: ["--content or --content-file", "--yes or --dry-run"],
4994
+ writes: true
4995
+ },
4996
+ {
4997
+ name: "page-comments resolve",
4998
+ args: ["commentId"],
4999
+ required: ["--yes or --dry-run"],
5000
+ writes: true
5001
+ },
5002
+ {
5003
+ name: "page-comments reopen",
5004
+ args: ["commentId"],
5005
+ required: ["--yes or --dry-run"],
5006
+ writes: true
5007
+ },
5008
+ {
5009
+ name: "page-comments delete",
5010
+ args: ["commentId"],
5011
+ required: ["--yes or --dry-run"],
5012
+ writes: true,
5013
+ destructive: true
5014
+ },
5015
+ {
5016
+ name: "admin-ingest repair-state",
5017
+ required: ["--instance"],
5018
+ writes: false
5019
+ },
5020
+ {
5021
+ name: "admin-ingest repair",
5022
+ required: ["--instance"],
5023
+ flags: ["--yes", "--dry-run"],
5024
+ writes: true
5025
+ },
3901
5026
  { name: "instances create-plan", writes: false },
3902
- { name: "instances create", flags: ["--data", "--yes", "--dry-run"], writes: true },
3903
- { name: "entities list", required: ["--instance"], flags: ["--language"], writes: false },
3904
- { name: "entities detail", args: ["entityId"], required: ["--instance"], flags: ["--language"], writes: false },
3905
- { name: "entities access-summary", required: ["--instance"], writes: false },
3906
- { name: "entities sync-google-groups", required: ["--instance"], flags: ["--yes", "--dry-run"], writes: true },
3907
- { name: "entities save-access-rules", required: ["--instance", "--entity-ids"], flags: ["--yes", "--dry-run"], writes: true },
3908
- { name: "entities set-restrictions", args: ["entityId"], required: ["--instance"], flags: ["--category-ids", "--learning-path-ids", "--alpha-program-ids", "--alpha-all-programs", "--yes", "--dry-run"], writes: true },
3909
- { name: "entities set-page-visibility", required: ["--instance", "--page"], flags: ["--entity-ids", "--yes", "--dry-run"], writes: true },
3910
- { name: "org-units-sync google", required: ["--instance"], flags: ["--yes", "--dry-run"], writes: true },
3911
- { name: "ambassadors label", required: ["--instance"], flags: ["--language"], writes: false },
5027
+ {
5028
+ name: "instances create",
5029
+ flags: ["--data", "--yes", "--dry-run"],
5030
+ writes: true
5031
+ },
5032
+ {
5033
+ name: "entities list",
5034
+ required: ["--instance"],
5035
+ flags: ["--language"],
5036
+ writes: false
5037
+ },
5038
+ {
5039
+ name: "entities detail",
5040
+ args: ["entityId"],
5041
+ required: ["--instance"],
5042
+ flags: ["--language"],
5043
+ writes: false
5044
+ },
5045
+ {
5046
+ name: "entities access-summary",
5047
+ required: ["--instance"],
5048
+ writes: false
5049
+ },
5050
+ {
5051
+ name: "entities sync-google-groups",
5052
+ required: ["--instance"],
5053
+ flags: ["--yes", "--dry-run"],
5054
+ writes: true
5055
+ },
5056
+ {
5057
+ name: "entities save-access-rules",
5058
+ required: ["--instance", "--entity-ids"],
5059
+ flags: ["--yes", "--dry-run"],
5060
+ writes: true
5061
+ },
5062
+ {
5063
+ name: "entities set-restrictions",
5064
+ args: ["entityId"],
5065
+ required: ["--instance"],
5066
+ flags: ["--category-ids", "--learning-path-ids", "--alpha-program-ids", "--alpha-all-programs", "--yes", "--dry-run"],
5067
+ writes: true
5068
+ },
5069
+ {
5070
+ name: "entities set-page-visibility",
5071
+ required: ["--instance", "--page"],
5072
+ flags: ["--entity-ids", "--yes", "--dry-run"],
5073
+ writes: true
5074
+ },
5075
+ {
5076
+ name: "org-units-sync google",
5077
+ required: ["--instance"],
5078
+ flags: ["--yes", "--dry-run"],
5079
+ writes: true
5080
+ },
5081
+ {
5082
+ name: "ambassadors label",
5083
+ required: ["--instance"],
5084
+ flags: ["--language"],
5085
+ writes: false
5086
+ },
3912
5087
  ...resources.flatMap((resource) => [
3913
- { name: `${resource.name} list`, writes: false, flags: ["--where", "--fields", "--take", "--skip", "--order-by", "--instance", "--dry-run"] },
5088
+ {
5089
+ name: `${resource.name} list`,
5090
+ writes: false,
5091
+ flags: ["--where", "--fields", "--take", "--skip", "--order-by", "--instance", "--dry-run"]
5092
+ },
3914
5093
  { name: `${resource.name} get`, args: ["id"], writes: false },
3915
- { name: `${resource.name} create`, flags: ["--data", "--data-file", "--instance", ...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [], "--yes", "--dry-run"], writes: true },
3916
- { name: `${resource.name} update`, args: ["id"], flags: ["--data", "--data-file", "--instance", ...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [], "--yes", "--dry-run"], writes: true },
3917
- { name: `${resource.name} delete`, args: ["id"], flags: ["--force", "--confirm-delete", "--yes", "--dry-run"], writes: true, destructive: false, softOnly: true }
5094
+ {
5095
+ name: `${resource.name} create`,
5096
+ flags: [
5097
+ "--data",
5098
+ "--data-file",
5099
+ "--instance",
5100
+ ...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [],
5101
+ "--yes",
5102
+ "--dry-run"
5103
+ ],
5104
+ writes: true
5105
+ },
5106
+ {
5107
+ name: `${resource.name} update`,
5108
+ args: ["id"],
5109
+ flags: [
5110
+ "--data",
5111
+ "--data-file",
5112
+ "--instance",
5113
+ ...UPLOADABLE_RESOURCE_NAMES.has(resource.name) ? ["--upload-file", "--upload-name", "--mime-type"] : [],
5114
+ "--yes",
5115
+ "--dry-run"
5116
+ ],
5117
+ writes: true
5118
+ },
5119
+ {
5120
+ name: `${resource.name} delete`,
5121
+ args: ["id"],
5122
+ flags: ["--force", "--confirm-delete", "--yes", "--dry-run"],
5123
+ writes: true,
5124
+ destructive: false,
5125
+ softOnly: true
5126
+ }
3918
5127
  ])
3919
5128
  ],
3920
5129
  resources: resources.map((resource) => ({
@@ -3927,11 +5136,7 @@ var schemaHelp = () => ({
3927
5136
  }))
3928
5137
  });
3929
5138
  var authHelp = () => ({
3930
- usage: [
3931
- "gskills-admin auth login --base-url https://g-skills.fr",
3932
- "gskills-admin auth whoami",
3933
- "gskills-admin auth logout"
3934
- ],
5139
+ usage: ["gskills-admin auth login --base-url https://g-skills.fr", "gskills-admin auth whoami", "gskills-admin auth logout"],
3935
5140
  note: "The browser logs into GSkills. Every API request re-checks SUPER_ADMIN in GSkills before touching the DB."
3936
5141
  });
3937
5142
  var skillsHelp = () => ({
@@ -3971,7 +5176,7 @@ var cacheHelp = () => ({
3971
5176
  "gskills-admin cache invalidate --instance <instanceId> --scope menu-bundle --yes",
3972
5177
  "gskills-admin cache invalidate --instance <instanceId> --scope all --yes"
3973
5178
  ],
3974
- scopes: ["all", "pages", "pages-knowledge", "menu-bundle", "applications"],
5179
+ scopes: ["all", "pages", "pages-knowledge", "menu-bundle", "applications", "learning-paths", "resources"],
3975
5180
  note: "Uses the same deploy-cache version bump system as the super-admin content settings screen."
3976
5181
  });
3977
5182
  var translateHelp = () => ({
@@ -3990,19 +5195,7 @@ var translateHelp = () => ({
3990
5195
  "gskills-admin translate chromebook-exercises <exerciseId> --to en --yes",
3991
5196
  "gskills-admin translate changelogs <changelogId> --to all --concurrency 8 --yes"
3992
5197
  ],
3993
- contentKinds: [
3994
- "pages",
3995
- "quizzes",
3996
- "topics",
3997
- "badges",
3998
- "menus",
3999
- "menu-sections",
4000
- "internal-knowledge",
4001
- "knowledge-video",
4002
- "learning-paths",
4003
- "chromebook-exercises",
4004
- "changelogs"
4005
- ],
5198
+ contentKinds: ["pages", "quizzes", "topics", "badges", "menus", "menu-sections", "internal-knowledge", "knowledge-video", "learning-paths", "chromebook-exercises", "changelogs"],
4006
5199
  modes: ["upsert", "create", "update", "patch"],
4007
5200
  selection: "Pass one id, --ids for several source rows, or --all with optional --instance, --from, --where and --take.",
4008
5201
  warning: PAGE_TRANSLATION_REWRITE_WARNING,
@@ -4053,8 +5246,18 @@ var importedSheetsHelp = () => ({
4053
5246
  displayName: "Cas d'usage Gemini",
4054
5247
  enabledLocales: ["fr", "en", "es"],
4055
5248
  multilangMode: "AI_TRANSLATION",
4056
- defaultLocaleSource: { locale: "fr", sourceInput: "https://docs.google.com/spreadsheets/d/...", tabName: "FR" },
4057
- localeSources: [{ locale: "fr", sourceInput: "https://docs.google.com/spreadsheets/d/...", tabName: "FR" }],
5249
+ defaultLocaleSource: {
5250
+ locale: "fr",
5251
+ sourceInput: "https://docs.google.com/spreadsheets/d/...",
5252
+ tabName: "FR"
5253
+ },
5254
+ localeSources: [
5255
+ {
5256
+ locale: "fr",
5257
+ sourceInput: "https://docs.google.com/spreadsheets/d/...",
5258
+ tabName: "FR"
5259
+ }
5260
+ ],
4058
5261
  ownerEmail: "admin@example.com",
4059
5262
  enableVectorization: true,
4060
5263
  vectorHeaders: ["Titre", "Description", "Prompt"]
@@ -4064,7 +5267,16 @@ var importedSheetsHelp = () => ({
4064
5267
  ownerEmail: "admin@example.com",
4065
5268
  viewMode: "LINE",
4066
5269
  enableVectorization: true,
4067
- columns: [{ id: "column_id", isVisible: true, includeInVectorization: true, displayType: "TITLE", showLabel: false, displayOrder: 0 }],
5270
+ columns: [
5271
+ {
5272
+ id: "column_id",
5273
+ isVisible: true,
5274
+ includeInVectorization: true,
5275
+ displayType: "TITLE",
5276
+ showLabel: false,
5277
+ displayOrder: 0
5278
+ }
5279
+ ],
4068
5280
  vectorHeaders: ["Titre", "Description", "Prompt"]
4069
5281
  },
4070
5282
  useCaseListFlow: [
@@ -4130,6 +5342,53 @@ var contentAssistantHelp = () => ({
4130
5342
  ],
4131
5343
  note: "Reads recent content-assistant chats and artifact metadata so agents do not query Chat and ChatMessage directly."
4132
5344
  });
5345
+ var governanceHelp = () => ({
5346
+ usage: [
5347
+ "gskills-admin governance list --instance global --output json",
5348
+ "gskills-admin governance list --instance <instanceId> --status TODO,IN_PROGRESS --mine --page-size 50",
5349
+ "gskills-admin governance get <entryId> --instance global",
5350
+ "gskills-admin governance comments-board --instance global --mine",
5351
+ "gskills-admin governance open-comment-count --instance global",
5352
+ "gskills-admin governance search --instance global --query Gmail",
5353
+ "gskills-admin governance options --instance global",
5354
+ "gskills-admin governance users",
5355
+ "gskills-admin governance instances",
5356
+ "gskills-admin governance create-task --entity-type page --entity-id <pageId> --status CHANGES_REQUESTED --task-title 'Relire la page' --dry-run",
5357
+ "gskills-admin governance upsert --entity-type page --entity-id <pageId> --status TO_REVIEW --dry-run",
5358
+ "gskills-admin governance update-task <entryId> --task-title 'À relire' --task-description-file ./details.md --dry-run",
5359
+ "gskills-admin governance set-assignees <entryId> --user-ids <userId,userId> --dry-run",
5360
+ "gskills-admin governance set-instance <entryId> --target-instance <instanceId> --dry-run",
5361
+ "gskills-admin governance set-instance <entryId> --clear --dry-run",
5362
+ "gskills-admin governance delete-task <entryId> --force --confirm-delete governance:<entryId> --dry-run",
5363
+ "gskills-admin governance comments list <entryId>",
5364
+ "gskills-admin governance comments add <entryId> --content-file ./comment.md --dry-run",
5365
+ "gskills-admin governance comments delete <commentId> --dry-run"
5366
+ ],
5367
+ status: ["TODO", "IN_PROGRESS", "TO_REVIEW", "CHANGES_REQUESTED", "DONE", "CANCELLED"],
5368
+ classification: ["CONTENT", "PEDAGOGY", "TECHNICAL", "EDITORIAL"],
5369
+ note: "Uses the same content governance task board data and mutations as the super-admin UI."
5370
+ });
5371
+ var governanceCommentsHelp = () => ({
5372
+ usage: [
5373
+ "gskills-admin governance comments list <entryId>",
5374
+ "gskills-admin governance comments add <entryId> --content 'Vu, je relis ça.' --dry-run",
5375
+ "gskills-admin governance comments add <entryId> --content-file ./comment.md --yes",
5376
+ "gskills-admin governance comments delete <commentId> --dry-run"
5377
+ ],
5378
+ note: "These are task discussion comments attached to targetType=GOVERNANCE_ENTRY."
5379
+ });
5380
+ var pageCommentsHelp = () => ({
5381
+ usage: [
5382
+ "gskills-admin page-comments list <pageId>",
5383
+ "gskills-admin page-comments add <pageId> --content-file ./comment.md --block-id <blockId> --anchor-quote-file ./quote.txt --dry-run",
5384
+ "gskills-admin page-comments add <pageId> --content '@[user_internal:<userId>] à corriger' --create-task --dry-run",
5385
+ "gskills-admin page-comments reply <parentCommentId> --content-file ./reply.md --dry-run",
5386
+ "gskills-admin page-comments resolve <commentId> --dry-run",
5387
+ "gskills-admin page-comments reopen <commentId> --dry-run",
5388
+ "gskills-admin page-comments delete <commentId> --dry-run"
5389
+ ],
5390
+ note: "Page comments are stored on the canonical source page, so instance copies share the same thread set."
5391
+ });
4133
5392
  var adminIngestHelp = () => ({
4134
5393
  usage: [
4135
5394
  "gskills-admin admin-ingest repair-state --instance <instanceId>",
@@ -4191,10 +5450,7 @@ var entitiesHelp = () => ({
4191
5450
  note: "Entity ids use the shared admin entity format: manual-group:<id>, org-unit:<id>, google-group:<email>."
4192
5451
  });
4193
5452
  var orgUnitsSyncHelp = () => ({
4194
- usage: [
4195
- "gskills-admin org-units-sync google --instance <instanceId> --dry-run",
4196
- "gskills-admin org-units-sync google --instance <instanceId> --yes"
4197
- ],
5453
+ usage: ["gskills-admin org-units-sync google --instance <instanceId> --dry-run", "gskills-admin org-units-sync google --instance <instanceId> --yes"],
4198
5454
  note: "Uses the same Google Admin OU sync engine as the instance admin UI."
4199
5455
  });
4200
5456
  var resourceHelp = (resource) => ({
@@ -4208,7 +5464,15 @@ var resourceHelp = (resource) => ({
4208
5464
  `gskills-admin ${resource.name} update <id> --data '{"disabled":true}' --yes`,
4209
5465
  `gskills-admin ${resource.name} delete <id> --force --confirm-delete ${resource.name}:<id> --yes`,
4210
5466
  ...resource.name === "internal-knowledge" ? [`gskills-admin ${resource.name} create --instance <instanceId> --upload-file ./video.mp4 --data '{"title":"Video","language":"fr","isActive":true}' --dry-run`] : [],
4211
- ...resource.name === "resources" ? [`gskills-admin ${resource.name} create --instance <instanceId> --upload-file ./webinar.mp4 --data '{"title":"Webinar","type":"WEBINAR","language":"fr","isActive":true}' --dry-run`] : [],
5467
+ ...resource.name === "resources" ? [
5468
+ `gskills-admin ${resource.name} create --instance <instanceId> --upload-file ./webinar.mp4 --data '{"title":"Webinar","type":"WEBINAR","language":"fr","isActive":true}' --dry-run`
5469
+ ] : [],
5470
+ ...resource.name === "learning-paths" ? [
5471
+ `gskills-admin ${resource.name} icons --query Gmail`,
5472
+ `gskills-admin ${resource.name} set-icon <id> --app Gmail --dry-run`,
5473
+ `gskills-admin ${resource.name} set-icon <id> --upload-file ./icon.png --instance <instanceId> --dry-run`,
5474
+ `gskills-admin ${resource.name} generate-icon <id> --prompt "flat central symbol" --dry-run`
5475
+ ] : [],
4212
5476
  ...resource.name === "internal-knowledge" ? [`gskills-admin ${resource.name} sync-media --since today --languages fr --all-targets --dry-run`] : [],
4213
5477
  ...resource.name === "pages" ? [`gskills-admin ${resource.name} backfill-field --field headerColor --all-targets --dry-run`] : [],
4214
5478
  ...resource.name === "pages" ? [`gskills-admin ${resource.name} content-schema --output json`] : [],
@@ -4228,8 +5492,16 @@ var resourceHelp = (resource) => ({
4228
5492
  guardRails: ["dry-run preview", "test operations", "optional updatedAt/version/content SHA checks", "page history snapshot"],
4229
5493
  schema: "gskills-admin pages content-schema --output json",
4230
5494
  examplePatch: [
4231
- { op: "test", path: "/blocks/0/type", value: "paragraph" },
4232
- { op: "replace", path: "/blocks/0/data/text", value: "New paragraph text" }
5495
+ {
5496
+ op: "test",
5497
+ path: "/blocks/0/type",
5498
+ value: "paragraph"
5499
+ },
5500
+ {
5501
+ op: "replace",
5502
+ path: "/blocks/0/data/text",
5503
+ value: "New paragraph text"
5504
+ }
4233
5505
  ]
4234
5506
  },
4235
5507
  blockHelpers: {