@sanity/cli 8.37.0 → 8.37.1

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.
Files changed (36) hide show
  1. package/dist/actions/dataset/blueprintDeletion.js +65 -0
  2. package/dist/actions/dataset/blueprintDeletion.js.map +1 -0
  3. package/dist/actions/doctor/checks/cliInstallation.js +21 -6
  4. package/dist/actions/doctor/checks/cliInstallation.js.map +1 -1
  5. package/dist/actions/doctor/types.js.map +1 -1
  6. package/dist/actions/init/initAction.js +1 -0
  7. package/dist/actions/init/initAction.js.map +1 -1
  8. package/dist/actions/init/types.js.map +1 -1
  9. package/dist/actions/targets/resolveCommandTarget.js +5 -2
  10. package/dist/actions/targets/resolveCommandTarget.js.map +1 -1
  11. package/dist/actions/targets/resolveProjectForCommand.js +28 -0
  12. package/dist/actions/targets/resolveProjectForCommand.js.map +1 -0
  13. package/dist/actions/telemetry/resolveConsent.js +5 -5
  14. package/dist/actions/telemetry/resolveConsent.js.map +1 -1
  15. package/dist/actions/telemetry/setConsent.js +1 -1
  16. package/dist/actions/telemetry/setConsent.js.map +1 -1
  17. package/dist/commands/datasets/create.js +33 -20
  18. package/dist/commands/datasets/create.js.map +1 -1
  19. package/dist/commands/datasets/delete.js +19 -12
  20. package/dist/commands/datasets/delete.js.map +1 -1
  21. package/dist/commands/datasets/list.js +9 -12
  22. package/dist/commands/datasets/list.js.map +1 -1
  23. package/dist/commands/doctor.js +4 -1
  24. package/dist/commands/doctor.js.map +1 -1
  25. package/dist/commands/init.js +15 -1
  26. package/dist/commands/init.js.map +1 -1
  27. package/dist/services/blueprints.js +6 -0
  28. package/dist/services/blueprints.js.map +1 -1
  29. package/dist/services/telemetry.js +3 -3
  30. package/dist/services/telemetry.js.map +1 -1
  31. package/dist/util/checkoutBlueprint.js +5 -0
  32. package/dist/util/checkoutBlueprint.js.map +1 -1
  33. package/oclif.manifest.json +317 -290
  34. package/package.json +2 -2
  35. package/dist/actions/telemetry/isTrueish.js +0 -10
  36. package/dist/actions/telemetry/isTrueish.js.map +0 -1
@@ -630,6 +630,13 @@
630
630
  "name": "json",
631
631
  "allowNo": false,
632
632
  "type": "boolean"
633
+ },
634
+ "with-blueprints": {
635
+ "description": "Use Blueprint-aware behavior",
636
+ "hidden": true,
637
+ "name": "with-blueprints",
638
+ "allowNo": false,
639
+ "type": "boolean"
633
640
  }
634
641
  },
635
642
  "hasDynamicHelp": false,
@@ -2869,6 +2876,13 @@
2869
2876
  }
2870
2877
  ],
2871
2878
  "flags": {
2879
+ "with-blueprints": {
2880
+ "description": "Use Blueprint-aware behavior",
2881
+ "hidden": true,
2882
+ "name": "with-blueprints",
2883
+ "allowNo": false,
2884
+ "type": "boolean"
2885
+ },
2872
2886
  "project": {
2873
2887
  "aliases": [
2874
2888
  "project-id"
@@ -2902,7 +2916,6 @@
2902
2916
  "visibility": {
2903
2917
  "description": "Set visibility for this dataset (custom/private/public)",
2904
2918
  "name": "visibility",
2905
- "required": false,
2906
2919
  "hasDynamicHelp": false,
2907
2920
  "multiple": false,
2908
2921
  "options": [
@@ -2961,6 +2974,13 @@
2961
2974
  }
2962
2975
  ],
2963
2976
  "flags": {
2977
+ "with-blueprints": {
2978
+ "description": "Use Blueprint-aware behavior",
2979
+ "hidden": true,
2980
+ "name": "with-blueprints",
2981
+ "allowNo": false,
2982
+ "type": "boolean"
2983
+ },
2964
2984
  "project": {
2965
2985
  "aliases": [
2966
2986
  "project-id"
@@ -3302,6 +3322,13 @@
3302
3322
  }
3303
3323
  ],
3304
3324
  "flags": {
3325
+ "with-blueprints": {
3326
+ "description": "Use Blueprint-aware behavior",
3327
+ "hidden": true,
3328
+ "name": "with-blueprints",
3329
+ "allowNo": false,
3330
+ "type": "boolean"
3331
+ },
3305
3332
  "project": {
3306
3333
  "aliases": [
3307
3334
  "project-id"
@@ -7556,30 +7583,24 @@
7556
7583
  "rebuild.js"
7557
7584
  ]
7558
7585
  },
7559
- "context:issues:apply": {
7586
+ "context:instructions:create": {
7560
7587
  "aliases": [],
7561
7588
  "args": {
7562
7589
  "knowledgeBaseId": {
7563
7590
  "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7564
7591
  "name": "knowledgeBaseId",
7565
7592
  "required": true
7566
- },
7567
- "issueIds": {
7568
- "description": "The IDs of the issues to accept and apply.",
7569
- "multiple": true,
7570
- "name": "issueIds",
7571
- "required": true
7572
7593
  }
7573
7594
  },
7574
- "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7595
+ "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
7575
7596
  "examples": [
7576
7597
  {
7577
7598
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7578
- "description": "Accept and apply issues"
7599
+ "description": "Create an instruction"
7579
7600
  },
7580
7601
  {
7581
7602
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7582
- "description": "Accept and apply issues, as JSON"
7603
+ "description": "Create an instruction, as JSON"
7583
7604
  }
7584
7605
  ],
7585
7606
  "flags": {
@@ -7590,35 +7611,77 @@
7590
7611
  "allowNo": false,
7591
7612
  "type": "boolean"
7592
7613
  },
7593
- "watch": {
7594
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7595
- "name": "watch",
7596
- "allowNo": false,
7614
+ "statement": {
7615
+ "description": "The instruction in plain language. Builds follow it over what the sources say.",
7616
+ "name": "statement",
7617
+ "required": true,
7618
+ "hasDynamicHelp": false,
7619
+ "multiple": false,
7620
+ "type": "option"
7621
+ },
7622
+ "scope-document-ids": {
7623
+ "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7624
+ "name": "scope-document-ids",
7625
+ "required": true,
7626
+ "hasDynamicHelp": false,
7627
+ "multiple": true,
7628
+ "type": "option"
7629
+ },
7630
+ "rebuild-paths": {
7631
+ "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
7632
+ "name": "rebuild-paths",
7633
+ "hasDynamicHelp": false,
7634
+ "multiple": true,
7635
+ "type": "option"
7636
+ },
7637
+ "verified": {
7638
+ "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
7639
+ "name": "verified",
7640
+ "allowNo": true,
7597
7641
  "type": "boolean"
7598
7642
  }
7599
7643
  },
7600
7644
  "hasDynamicHelp": false,
7601
7645
  "hiddenAliases": [],
7602
- "id": "context:issues:apply",
7646
+ "id": "context:instructions:create",
7603
7647
  "pluginAlias": "@sanity/cli",
7604
7648
  "pluginName": "@sanity/cli",
7605
7649
  "pluginType": "core",
7606
7650
  "strict": true,
7607
- "summary": "Accept and apply issues",
7651
+ "summary": "Create an instruction",
7608
7652
  "enableJsonFlag": true,
7609
7653
  "telemetry": {
7610
- "redactedFlags": []
7654
+ "redactedFlags": [
7655
+ {
7656
+ "canonical": "--statement",
7657
+ "flags": [
7658
+ "--statement"
7659
+ ]
7660
+ },
7661
+ {
7662
+ "canonical": "--scope-document-ids",
7663
+ "flags": [
7664
+ "--scope-document-ids"
7665
+ ]
7666
+ },
7667
+ {
7668
+ "canonical": "--rebuild-paths",
7669
+ "flags": [
7670
+ "--rebuild-paths"
7671
+ ]
7672
+ }
7673
+ ]
7611
7674
  },
7612
7675
  "isESM": true,
7613
7676
  "relativePath": [
7614
7677
  "dist",
7615
7678
  "commands",
7616
7679
  "context",
7617
- "issues",
7618
- "apply.js"
7680
+ "instructions",
7681
+ "create.js"
7619
7682
  ]
7620
7683
  },
7621
- "context:issues:dismiss": {
7684
+ "context:instructions:delete": {
7622
7685
  "aliases": [],
7623
7686
  "args": {
7624
7687
  "knowledgeBaseId": {
@@ -7626,21 +7689,21 @@
7626
7689
  "name": "knowledgeBaseId",
7627
7690
  "required": true
7628
7691
  },
7629
- "issueId": {
7630
- "description": "The issue's document ID.",
7631
- "name": "issueId",
7692
+ "instructionId": {
7693
+ "description": "The instruction's ID.",
7694
+ "name": "instructionId",
7632
7695
  "required": true
7633
7696
  }
7634
7697
  },
7635
- "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7698
+ "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
7636
7699
  "examples": [
7637
7700
  {
7638
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7639
- "description": "Dismiss an issue"
7701
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7702
+ "description": "Delete an instruction"
7640
7703
  },
7641
7704
  {
7642
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7643
- "description": "Dismiss an issue, as JSON"
7705
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7706
+ "description": "Delete an instruction, as JSON"
7644
7707
  }
7645
7708
  ],
7646
7709
  "flags": {
@@ -7650,16 +7713,29 @@
7650
7713
  "name": "json",
7651
7714
  "allowNo": false,
7652
7715
  "type": "boolean"
7716
+ },
7717
+ "rebuild": {
7718
+ "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
7719
+ "name": "rebuild",
7720
+ "allowNo": true,
7721
+ "type": "boolean"
7722
+ },
7723
+ "yes": {
7724
+ "char": "y",
7725
+ "description": "Skip confirmation prompt (unattended mode)",
7726
+ "name": "yes",
7727
+ "allowNo": false,
7728
+ "type": "boolean"
7653
7729
  }
7654
7730
  },
7655
7731
  "hasDynamicHelp": false,
7656
7732
  "hiddenAliases": [],
7657
- "id": "context:issues:dismiss",
7733
+ "id": "context:instructions:delete",
7658
7734
  "pluginAlias": "@sanity/cli",
7659
7735
  "pluginName": "@sanity/cli",
7660
7736
  "pluginType": "core",
7661
7737
  "strict": true,
7662
- "summary": "Dismiss an issue",
7738
+ "summary": "Delete an instruction",
7663
7739
  "enableJsonFlag": true,
7664
7740
  "telemetry": {
7665
7741
  "redactedFlags": []
@@ -7669,33 +7745,33 @@
7669
7745
  "dist",
7670
7746
  "commands",
7671
7747
  "context",
7672
- "issues",
7673
- "dismiss.js"
7748
+ "instructions",
7749
+ "delete.js"
7674
7750
  ]
7675
7751
  },
7676
- "context:issues:get": {
7752
+ "context:instructions:edit": {
7677
7753
  "aliases": [],
7678
7754
  "args": {
7679
7755
  "knowledgeBaseId": {
7680
- "description": "Knowledge base ID",
7756
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7681
7757
  "name": "knowledgeBaseId",
7682
7758
  "required": true
7683
7759
  },
7684
- "issueId": {
7685
- "description": "Issue ID",
7686
- "name": "issueId",
7760
+ "instructionId": {
7761
+ "description": "The instruction's ID.",
7762
+ "name": "instructionId",
7687
7763
  "required": true
7688
7764
  }
7689
7765
  },
7690
- "description": "Get details of an issue",
7766
+ "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
7691
7767
  "examples": [
7692
7768
  {
7693
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7694
- "description": "Get details of a specific issue"
7769
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7770
+ "description": "Update an instruction"
7695
7771
  },
7696
7772
  {
7697
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7698
- "description": "Output the issue as JSON"
7773
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7774
+ "description": "Update an instruction, as JSON"
7699
7775
  }
7700
7776
  ],
7701
7777
  "flags": {
@@ -7705,55 +7781,80 @@
7705
7781
  "name": "json",
7706
7782
  "allowNo": false,
7707
7783
  "type": "boolean"
7784
+ },
7785
+ "statement": {
7786
+ "description": "The new instruction text. Omit it to keep the current text.",
7787
+ "name": "statement",
7788
+ "hasDynamicHelp": false,
7789
+ "multiple": false,
7790
+ "type": "option"
7791
+ },
7792
+ "scope-document-ids": {
7793
+ "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7794
+ "name": "scope-document-ids",
7795
+ "hasDynamicHelp": false,
7796
+ "multiple": true,
7797
+ "type": "option"
7708
7798
  }
7709
7799
  },
7710
7800
  "hasDynamicHelp": false,
7711
7801
  "hiddenAliases": [],
7712
- "id": "context:issues:get",
7802
+ "id": "context:instructions:edit",
7713
7803
  "pluginAlias": "@sanity/cli",
7714
7804
  "pluginName": "@sanity/cli",
7715
7805
  "pluginType": "core",
7716
7806
  "strict": true,
7807
+ "summary": "Update an instruction",
7717
7808
  "enableJsonFlag": true,
7809
+ "telemetry": {
7810
+ "redactedFlags": [
7811
+ {
7812
+ "canonical": "--statement",
7813
+ "flags": [
7814
+ "--statement"
7815
+ ]
7816
+ },
7817
+ {
7818
+ "canonical": "--scope-document-ids",
7819
+ "flags": [
7820
+ "--scope-document-ids"
7821
+ ]
7822
+ }
7823
+ ]
7824
+ },
7718
7825
  "isESM": true,
7719
7826
  "relativePath": [
7720
7827
  "dist",
7721
7828
  "commands",
7722
7829
  "context",
7723
- "issues",
7724
- "get.js"
7830
+ "instructions",
7831
+ "edit.js"
7725
7832
  ]
7726
7833
  },
7727
- "context:issues:list": {
7834
+ "context:issues:apply": {
7728
7835
  "aliases": [],
7729
7836
  "args": {
7730
7837
  "knowledgeBaseId": {
7731
- "description": "Knowledge base ID",
7838
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7732
7839
  "name": "knowledgeBaseId",
7733
7840
  "required": true
7841
+ },
7842
+ "issueIds": {
7843
+ "description": "The IDs of the issues to accept and apply.",
7844
+ "multiple": true,
7845
+ "name": "issueIds",
7846
+ "required": true
7734
7847
  }
7735
7848
  },
7736
- "description": "List issues found by knowledge base builds",
7849
+ "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7737
7850
  "examples": [
7738
7851
  {
7739
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7740
- "description": "List all issues for a knowledge base"
7741
- },
7742
- {
7743
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
7744
- "description": "List issues awaiting triage"
7745
- },
7746
- {
7747
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
7748
- "description": "List critical conflicts"
7749
- },
7750
- {
7751
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
7752
- "description": "List issues about entries under billing/"
7852
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7853
+ "description": "Accept and apply issues"
7753
7854
  },
7754
7855
  {
7755
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7756
- "description": "Output issues as JSON"
7856
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7857
+ "description": "Accept and apply issues, as JSON"
7757
7858
  }
7758
7859
  ],
7759
7860
  "flags": {
@@ -7764,67 +7865,35 @@
7764
7865
  "allowNo": false,
7765
7866
  "type": "boolean"
7766
7867
  },
7767
- "kind": {
7768
- "description": "Only list issues of this kind",
7769
- "name": "kind",
7770
- "hasDynamicHelp": false,
7771
- "multiple": false,
7772
- "options": [
7773
- "conflict",
7774
- "update_required"
7775
- ],
7776
- "type": "option"
7777
- },
7778
- "scope": {
7779
- "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
7780
- "name": "scope",
7781
- "hasDynamicHelp": false,
7782
- "helpValue": "<path>",
7783
- "multiple": false,
7784
- "type": "option"
7785
- },
7786
- "severity": {
7787
- "description": "Only list issues of this severity",
7788
- "name": "severity",
7789
- "hasDynamicHelp": false,
7790
- "multiple": false,
7791
- "options": [
7792
- "critical",
7793
- "suggestion"
7794
- ],
7795
- "type": "option"
7796
- },
7797
- "status": {
7798
- "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
7799
- "name": "status",
7800
- "hasDynamicHelp": false,
7801
- "multiple": false,
7802
- "options": [
7803
- "open",
7804
- "accepted",
7805
- "rejected"
7806
- ],
7807
- "type": "option"
7868
+ "watch": {
7869
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7870
+ "name": "watch",
7871
+ "allowNo": false,
7872
+ "type": "boolean"
7808
7873
  }
7809
7874
  },
7810
7875
  "hasDynamicHelp": false,
7811
7876
  "hiddenAliases": [],
7812
- "id": "context:issues:list",
7877
+ "id": "context:issues:apply",
7813
7878
  "pluginAlias": "@sanity/cli",
7814
7879
  "pluginName": "@sanity/cli",
7815
7880
  "pluginType": "core",
7816
7881
  "strict": true,
7882
+ "summary": "Accept and apply issues",
7817
7883
  "enableJsonFlag": true,
7884
+ "telemetry": {
7885
+ "redactedFlags": []
7886
+ },
7818
7887
  "isESM": true,
7819
7888
  "relativePath": [
7820
7889
  "dist",
7821
7890
  "commands",
7822
7891
  "context",
7823
7892
  "issues",
7824
- "list.js"
7893
+ "apply.js"
7825
7894
  ]
7826
7895
  },
7827
- "context:issues:reopen": {
7896
+ "context:issues:dismiss": {
7828
7897
  "aliases": [],
7829
7898
  "args": {
7830
7899
  "knowledgeBaseId": {
@@ -7838,15 +7907,15 @@
7838
7907
  "required": true
7839
7908
  }
7840
7909
  },
7841
- "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
7910
+ "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7842
7911
  "examples": [
7843
7912
  {
7844
7913
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7845
- "description": "Reopen an accepted conflict"
7914
+ "description": "Dismiss an issue"
7846
7915
  },
7847
7916
  {
7848
7917
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7849
- "description": "Reopen an accepted conflict, as JSON"
7918
+ "description": "Dismiss an issue, as JSON"
7850
7919
  }
7851
7920
  ],
7852
7921
  "flags": {
@@ -7860,12 +7929,12 @@
7860
7929
  },
7861
7930
  "hasDynamicHelp": false,
7862
7931
  "hiddenAliases": [],
7863
- "id": "context:issues:reopen",
7932
+ "id": "context:issues:dismiss",
7864
7933
  "pluginAlias": "@sanity/cli",
7865
7934
  "pluginName": "@sanity/cli",
7866
7935
  "pluginType": "core",
7867
7936
  "strict": true,
7868
- "summary": "Reopen an accepted conflict",
7937
+ "summary": "Dismiss an issue",
7869
7938
  "enableJsonFlag": true,
7870
7939
  "telemetry": {
7871
7940
  "redactedFlags": []
@@ -7876,32 +7945,32 @@
7876
7945
  "commands",
7877
7946
  "context",
7878
7947
  "issues",
7879
- "reopen.js"
7948
+ "dismiss.js"
7880
7949
  ]
7881
7950
  },
7882
- "context:issues:resolve": {
7951
+ "context:issues:get": {
7883
7952
  "aliases": [],
7884
7953
  "args": {
7885
7954
  "knowledgeBaseId": {
7886
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7955
+ "description": "Knowledge base ID",
7887
7956
  "name": "knowledgeBaseId",
7888
7957
  "required": true
7889
7958
  },
7890
7959
  "issueId": {
7891
- "description": "The issue's document ID.",
7960
+ "description": "Issue ID",
7892
7961
  "name": "issueId",
7893
7962
  "required": true
7894
7963
  }
7895
7964
  },
7896
- "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
7965
+ "description": "Get details of an issue",
7897
7966
  "examples": [
7898
7967
  {
7899
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
7900
- "description": "Choose the correct side interactively"
7968
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7969
+ "description": "Get details of a specific issue"
7901
7970
  },
7902
7971
  {
7903
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
7904
- "description": "Choose side 1 and wait for the entry rewrite"
7972
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7973
+ "description": "Output the issue as JSON"
7905
7974
  }
7906
7975
  ],
7907
7976
  "flags": {
@@ -7911,64 +7980,55 @@
7911
7980
  "name": "json",
7912
7981
  "allowNo": false,
7913
7982
  "type": "boolean"
7914
- },
7915
- "watch": {
7916
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7917
- "name": "watch",
7918
- "allowNo": false,
7919
- "type": "boolean"
7920
- },
7921
- "side": {
7922
- "description": "Index of the correct side, as listed by `sanity context issues get`",
7923
- "name": "side",
7924
- "hasDynamicHelp": false,
7925
- "multiple": false,
7926
- "type": "option"
7927
7983
  }
7928
7984
  },
7929
7985
  "hasDynamicHelp": false,
7930
7986
  "hiddenAliases": [],
7931
- "id": "context:issues:resolve",
7987
+ "id": "context:issues:get",
7932
7988
  "pluginAlias": "@sanity/cli",
7933
7989
  "pluginName": "@sanity/cli",
7934
7990
  "pluginType": "core",
7935
- "summary": "Resolve a conflict issue",
7991
+ "strict": true,
7936
7992
  "enableJsonFlag": true,
7937
- "telemetry": {
7938
- "redactedFlags": []
7939
- },
7940
7993
  "isESM": true,
7941
7994
  "relativePath": [
7942
7995
  "dist",
7943
7996
  "commands",
7944
7997
  "context",
7945
7998
  "issues",
7946
- "resolve.js"
7999
+ "get.js"
7947
8000
  ]
7948
8001
  },
7949
- "context:jobs:get": {
8002
+ "context:issues:list": {
7950
8003
  "aliases": [],
7951
8004
  "args": {
7952
8005
  "knowledgeBaseId": {
7953
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
8006
+ "description": "Knowledge base ID",
7954
8007
  "name": "knowledgeBaseId",
7955
8008
  "required": true
7956
- },
7957
- "jobId": {
7958
- "description": "The job ID returned by the endpoint that started the work.",
7959
- "name": "jobId",
7960
- "required": true
7961
8009
  }
7962
8010
  },
7963
- "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
8011
+ "description": "List issues found by knowledge base builds",
7964
8012
  "examples": [
7965
8013
  {
7966
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
7967
- "description": "Get a job"
8014
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
8015
+ "description": "List all issues for a knowledge base"
7968
8016
  },
7969
8017
  {
7970
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
7971
- "description": "Get a job, as JSON"
8018
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
8019
+ "description": "List issues awaiting triage"
8020
+ },
8021
+ {
8022
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
8023
+ "description": "List critical conflicts"
8024
+ },
8025
+ {
8026
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
8027
+ "description": "List issues about entries under billing/"
8028
+ },
8029
+ {
8030
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
8031
+ "description": "Output issues as JSON"
7972
8032
  }
7973
8033
  ],
7974
8034
  "flags": {
@@ -7979,52 +8039,89 @@
7979
8039
  "allowNo": false,
7980
8040
  "type": "boolean"
7981
8041
  },
7982
- "watch": {
7983
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7984
- "name": "watch",
7985
- "allowNo": false,
7986
- "type": "boolean"
8042
+ "kind": {
8043
+ "description": "Only list issues of this kind",
8044
+ "name": "kind",
8045
+ "hasDynamicHelp": false,
8046
+ "multiple": false,
8047
+ "options": [
8048
+ "conflict",
8049
+ "update_required"
8050
+ ],
8051
+ "type": "option"
8052
+ },
8053
+ "scope": {
8054
+ "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
8055
+ "name": "scope",
8056
+ "hasDynamicHelp": false,
8057
+ "helpValue": "<path>",
8058
+ "multiple": false,
8059
+ "type": "option"
8060
+ },
8061
+ "severity": {
8062
+ "description": "Only list issues of this severity",
8063
+ "name": "severity",
8064
+ "hasDynamicHelp": false,
8065
+ "multiple": false,
8066
+ "options": [
8067
+ "critical",
8068
+ "suggestion"
8069
+ ],
8070
+ "type": "option"
8071
+ },
8072
+ "status": {
8073
+ "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
8074
+ "name": "status",
8075
+ "hasDynamicHelp": false,
8076
+ "multiple": false,
8077
+ "options": [
8078
+ "open",
8079
+ "accepted",
8080
+ "rejected"
8081
+ ],
8082
+ "type": "option"
7987
8083
  }
7988
8084
  },
7989
8085
  "hasDynamicHelp": false,
7990
8086
  "hiddenAliases": [],
7991
- "id": "context:jobs:get",
8087
+ "id": "context:issues:list",
7992
8088
  "pluginAlias": "@sanity/cli",
7993
8089
  "pluginName": "@sanity/cli",
7994
8090
  "pluginType": "core",
7995
8091
  "strict": true,
7996
- "summary": "Get a job",
7997
8092
  "enableJsonFlag": true,
7998
- "telemetry": {
7999
- "redactedFlags": []
8000
- },
8001
8093
  "isESM": true,
8002
8094
  "relativePath": [
8003
8095
  "dist",
8004
8096
  "commands",
8005
8097
  "context",
8006
- "jobs",
8007
- "get.js"
8098
+ "issues",
8099
+ "list.js"
8008
8100
  ]
8009
8101
  },
8010
- "context:instructions:create": {
8102
+ "context:issues:reopen": {
8011
8103
  "aliases": [],
8012
8104
  "args": {
8013
8105
  "knowledgeBaseId": {
8014
8106
  "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
8015
8107
  "name": "knowledgeBaseId",
8016
8108
  "required": true
8109
+ },
8110
+ "issueId": {
8111
+ "description": "The issue's document ID.",
8112
+ "name": "issueId",
8113
+ "required": true
8017
8114
  }
8018
8115
  },
8019
- "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
8116
+ "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
8020
8117
  "examples": [
8021
8118
  {
8022
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
8023
- "description": "Create an instruction"
8119
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
8120
+ "description": "Reopen an accepted conflict"
8024
8121
  },
8025
8122
  {
8026
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
8027
- "description": "Create an instruction, as JSON"
8123
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
8124
+ "description": "Reopen an accepted conflict, as JSON"
8028
8125
  }
8029
8126
  ],
8030
8127
  "flags": {
@@ -8034,78 +8131,30 @@
8034
8131
  "name": "json",
8035
8132
  "allowNo": false,
8036
8133
  "type": "boolean"
8037
- },
8038
- "statement": {
8039
- "description": "The instruction in plain language. Builds follow it over what the sources say.",
8040
- "name": "statement",
8041
- "required": true,
8042
- "hasDynamicHelp": false,
8043
- "multiple": false,
8044
- "type": "option"
8045
- },
8046
- "scope-document-ids": {
8047
- "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8048
- "name": "scope-document-ids",
8049
- "required": true,
8050
- "hasDynamicHelp": false,
8051
- "multiple": true,
8052
- "type": "option"
8053
- },
8054
- "rebuild-paths": {
8055
- "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
8056
- "name": "rebuild-paths",
8057
- "hasDynamicHelp": false,
8058
- "multiple": true,
8059
- "type": "option"
8060
- },
8061
- "verified": {
8062
- "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
8063
- "name": "verified",
8064
- "allowNo": true,
8065
- "type": "boolean"
8066
8134
  }
8067
8135
  },
8068
8136
  "hasDynamicHelp": false,
8069
8137
  "hiddenAliases": [],
8070
- "id": "context:instructions:create",
8138
+ "id": "context:issues:reopen",
8071
8139
  "pluginAlias": "@sanity/cli",
8072
8140
  "pluginName": "@sanity/cli",
8073
8141
  "pluginType": "core",
8074
8142
  "strict": true,
8075
- "summary": "Create an instruction",
8143
+ "summary": "Reopen an accepted conflict",
8076
8144
  "enableJsonFlag": true,
8077
8145
  "telemetry": {
8078
- "redactedFlags": [
8079
- {
8080
- "canonical": "--statement",
8081
- "flags": [
8082
- "--statement"
8083
- ]
8084
- },
8085
- {
8086
- "canonical": "--scope-document-ids",
8087
- "flags": [
8088
- "--scope-document-ids"
8089
- ]
8090
- },
8091
- {
8092
- "canonical": "--rebuild-paths",
8093
- "flags": [
8094
- "--rebuild-paths"
8095
- ]
8096
- }
8097
- ]
8146
+ "redactedFlags": []
8098
8147
  },
8099
8148
  "isESM": true,
8100
8149
  "relativePath": [
8101
8150
  "dist",
8102
8151
  "commands",
8103
8152
  "context",
8104
- "instructions",
8105
- "create.js"
8153
+ "issues",
8154
+ "reopen.js"
8106
8155
  ]
8107
8156
  },
8108
- "context:instructions:delete": {
8157
+ "context:issues:resolve": {
8109
8158
  "aliases": [],
8110
8159
  "args": {
8111
8160
  "knowledgeBaseId": {
@@ -8113,21 +8162,21 @@
8113
8162
  "name": "knowledgeBaseId",
8114
8163
  "required": true
8115
8164
  },
8116
- "instructionId": {
8117
- "description": "The instruction's ID.",
8118
- "name": "instructionId",
8165
+ "issueId": {
8166
+ "description": "The issue's document ID.",
8167
+ "name": "issueId",
8119
8168
  "required": true
8120
8169
  }
8121
8170
  },
8122
- "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
8171
+ "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
8123
8172
  "examples": [
8124
8173
  {
8125
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8126
- "description": "Delete an instruction"
8174
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
8175
+ "description": "Choose the correct side interactively"
8127
8176
  },
8128
8177
  {
8129
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8130
- "description": "Delete an instruction, as JSON"
8178
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
8179
+ "description": "Choose side 1 and wait for the entry rewrite"
8131
8180
  }
8132
8181
  ],
8133
8182
  "flags": {
@@ -8138,28 +8187,27 @@
8138
8187
  "allowNo": false,
8139
8188
  "type": "boolean"
8140
8189
  },
8141
- "rebuild": {
8142
- "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
8143
- "name": "rebuild",
8144
- "allowNo": true,
8145
- "type": "boolean"
8146
- },
8147
- "yes": {
8148
- "char": "y",
8149
- "description": "Skip confirmation prompt (unattended mode)",
8150
- "name": "yes",
8190
+ "watch": {
8191
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
8192
+ "name": "watch",
8151
8193
  "allowNo": false,
8152
8194
  "type": "boolean"
8195
+ },
8196
+ "side": {
8197
+ "description": "Index of the correct side, as listed by `sanity context issues get`",
8198
+ "name": "side",
8199
+ "hasDynamicHelp": false,
8200
+ "multiple": false,
8201
+ "type": "option"
8153
8202
  }
8154
8203
  },
8155
8204
  "hasDynamicHelp": false,
8156
8205
  "hiddenAliases": [],
8157
- "id": "context:instructions:delete",
8206
+ "id": "context:issues:resolve",
8158
8207
  "pluginAlias": "@sanity/cli",
8159
8208
  "pluginName": "@sanity/cli",
8160
8209
  "pluginType": "core",
8161
- "strict": true,
8162
- "summary": "Delete an instruction",
8210
+ "summary": "Resolve a conflict issue",
8163
8211
  "enableJsonFlag": true,
8164
8212
  "telemetry": {
8165
8213
  "redactedFlags": []
@@ -8169,11 +8217,11 @@
8169
8217
  "dist",
8170
8218
  "commands",
8171
8219
  "context",
8172
- "instructions",
8173
- "delete.js"
8220
+ "issues",
8221
+ "resolve.js"
8174
8222
  ]
8175
8223
  },
8176
- "context:instructions:edit": {
8224
+ "context:jobs:get": {
8177
8225
  "aliases": [],
8178
8226
  "args": {
8179
8227
  "knowledgeBaseId": {
@@ -8181,21 +8229,21 @@
8181
8229
  "name": "knowledgeBaseId",
8182
8230
  "required": true
8183
8231
  },
8184
- "instructionId": {
8185
- "description": "The instruction's ID.",
8186
- "name": "instructionId",
8232
+ "jobId": {
8233
+ "description": "The job ID returned by the endpoint that started the work.",
8234
+ "name": "jobId",
8187
8235
  "required": true
8188
8236
  }
8189
8237
  },
8190
- "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
8238
+ "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
8191
8239
  "examples": [
8192
8240
  {
8193
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8194
- "description": "Update an instruction"
8241
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
8242
+ "description": "Get a job"
8195
8243
  },
8196
8244
  {
8197
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8198
- "description": "Update an instruction, as JSON"
8245
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
8246
+ "description": "Get a job, as JSON"
8199
8247
  }
8200
8248
  ],
8201
8249
  "flags": {
@@ -8206,53 +8254,32 @@
8206
8254
  "allowNo": false,
8207
8255
  "type": "boolean"
8208
8256
  },
8209
- "statement": {
8210
- "description": "The new instruction text. Omit it to keep the current text.",
8211
- "name": "statement",
8212
- "hasDynamicHelp": false,
8213
- "multiple": false,
8214
- "type": "option"
8215
- },
8216
- "scope-document-ids": {
8217
- "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8218
- "name": "scope-document-ids",
8219
- "hasDynamicHelp": false,
8220
- "multiple": true,
8221
- "type": "option"
8257
+ "watch": {
8258
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
8259
+ "name": "watch",
8260
+ "allowNo": false,
8261
+ "type": "boolean"
8222
8262
  }
8223
8263
  },
8224
8264
  "hasDynamicHelp": false,
8225
8265
  "hiddenAliases": [],
8226
- "id": "context:instructions:edit",
8266
+ "id": "context:jobs:get",
8227
8267
  "pluginAlias": "@sanity/cli",
8228
8268
  "pluginName": "@sanity/cli",
8229
8269
  "pluginType": "core",
8230
8270
  "strict": true,
8231
- "summary": "Update an instruction",
8271
+ "summary": "Get a job",
8232
8272
  "enableJsonFlag": true,
8233
8273
  "telemetry": {
8234
- "redactedFlags": [
8235
- {
8236
- "canonical": "--statement",
8237
- "flags": [
8238
- "--statement"
8239
- ]
8240
- },
8241
- {
8242
- "canonical": "--scope-document-ids",
8243
- "flags": [
8244
- "--scope-document-ids"
8245
- ]
8246
- }
8247
- ]
8274
+ "redactedFlags": []
8248
8275
  },
8249
8276
  "isESM": true,
8250
8277
  "relativePath": [
8251
8278
  "dist",
8252
8279
  "commands",
8253
8280
  "context",
8254
- "instructions",
8255
- "edit.js"
8281
+ "jobs",
8282
+ "get.js"
8256
8283
  ]
8257
8284
  },
8258
8285
  "context:mcp:create": {
@@ -10435,5 +10462,5 @@
10435
10462
  ]
10436
10463
  }
10437
10464
  },
10438
- "version": "8.37.0"
10465
+ "version": "8.37.1"
10439
10466
  }