@sanity/cli-core 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,6 +27,24 @@ Browser environment mock. Note this depends on `jsdom` (~46 MB) and so has non-t
27
27
  | -------------------------- | ---------------------------------------------- |
28
28
  | `mockBrowserEnvironment()` | Set up a mocked browser environment via JSDOM. |
29
29
 
30
+ ## `@sanity/cli-core/commandPolicy`
31
+
32
+ The contract for exposing commands to programmatic invocation sources, such as the remote MCP server.
33
+
34
+ | Export | Description |
35
+ | ------------------------------------------ | ------------------------------------------------------------------------------------ |
36
+ | `allow` | Policy stating every valid invocation of the command is safe. |
37
+ | `deny` | Policy stating no invocation is safe; the command behaves like an unknown one. |
38
+ | `conditionalDenyFlags(...names)` | Policy refusing the named flags, which are also hidden from rendered help. |
39
+ | `conditionalPolicy(options)` | `conditionalDenyFlags` plus an extra predicate on the parsed invocation. |
40
+ | `definePluginInvocationPolicies(policies)` | Type-checked identity helper for authoring a plugin's policy module. |
41
+ | `isCommandPolicySet(value)` | Whether a value is a usable policy table. Used by the host to verify plugin modules. |
42
+ | `isConditionalInvocationPolicy(policy)` | Type-guard narrowing a policy to its conditional form. |
43
+ | `CommandPolicy` | One command's policy: a `kind` and a `validate` predicate. |
44
+ | `CommandPolicySet` | A complete policy table, keyed by oclif command id. |
45
+ | `InvocationSource` | Where an invocation originates; selects the policy to enforce. |
46
+ | `PluginInvocationPolicies` | The policies a plugin declares, keyed by invocation source. |
47
+
30
48
  ## `@sanity/cli-core/config`
31
49
 
32
50
  CLI, studio, and workspace configuration helpers.
@@ -35,7 +35,7 @@ declare abstract class SanityCommand<T extends typeof Command> extends Command i
35
35
  *
36
36
  * @deprecated use `getGlobalCliClient` function directly instead.
37
37
  */
38
- protected getGlobalApiClient: (args: GlobalCliClientOptions) => Promise<import("@sanity/client").SanityClient>;
38
+ protected getGlobalApiClient: (args: GlobalCliClientOptions) => Promise<import("sanity").SanityClient>;
39
39
  /**
40
40
  * Get the project API client.
41
41
  *
@@ -44,7 +44,7 @@ declare abstract class SanityCommand<T extends typeof Command> extends Command i
44
44
  *
45
45
  * @deprecated use `getProjectCliClient` function directly instead.
46
46
  */
47
- protected getProjectApiClient: (args: ProjectCliClientOptions) => Promise<import("@sanity/client").SanityClient>;
47
+ protected getProjectApiClient: (args: ProjectCliClientOptions) => Promise<import("sanity").SanityClient>;
48
48
  /**
49
49
  * Helper for outputting to the console.
50
50
  *
@@ -0,0 +1,149 @@
1
+ import { z } from "zod/mini";
2
+ /**
3
+ * The contract for exposing CLI commands to programmatic invocation sources,
4
+ * such as the remote MCP server.
5
+ *
6
+ * A command reaches a programmatic caller only when it satisfies both halves
7
+ * of this contract:
8
+ *
9
+ * 1. **Capability.** The command must be runnable in isolation, which means
10
+ * extending `SanityCommand` (see `@sanity/cli-core/SanityCommand`). That
11
+ * base class supplies `runInExecutionContext()` and routes output, token
12
+ * resolution, interactivity, and project discovery through the CLI
13
+ * execution context. A command extending oclif's `Command` directly cannot
14
+ * be invoked programmatically, no matter what policy it declares.
15
+ * 2. **Policy.** Something must state that the invocation is safe. For the
16
+ * `@sanity/cli` package's own commands that statement lives in the CLI. A
17
+ * plugin states it for its own commands by declaring a policy module (see
18
+ * {@link PluginInvocationPolicies}).
19
+ *
20
+ * Anything not covered by both halves is denied. The absence of a policy is
21
+ * never read as permission.
22
+ */
23
+ /** The command invocation a conditional policy is evaluated against. */
24
+ declare const InvocationPolicySchema: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
25
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
26
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
27
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
28
+ declare const CommandPolicyConditionalSchema: z.ZodMiniObject<{
29
+ deniedFlags: z.ZodMiniArray<z.ZodMiniString<string>>;
30
+ kind: z.ZodMiniLiteral<"conditional">;
31
+ validate: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
32
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
33
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
34
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
35
+ }, z.core.$strip>;
36
+ declare const CommandPolicySchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
37
+ kind: z.ZodMiniEnum<{
38
+ allow: "allow";
39
+ deny: "deny";
40
+ }>;
41
+ validate: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
42
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
43
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
44
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
45
+ }, z.core.$strip>, z.ZodMiniObject<{
46
+ deniedFlags: z.ZodMiniArray<z.ZodMiniString<string>>;
47
+ kind: z.ZodMiniLiteral<"conditional">;
48
+ validate: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
49
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
50
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
51
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
52
+ }, z.core.$strip>]>;
53
+ declare const CommandPolicySetSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
54
+ kind: z.ZodMiniEnum<{
55
+ allow: "allow";
56
+ deny: "deny";
57
+ }>;
58
+ validate: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
59
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
60
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
61
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
62
+ }, z.core.$strip>, z.ZodMiniObject<{
63
+ deniedFlags: z.ZodMiniArray<z.ZodMiniString<string>>;
64
+ kind: z.ZodMiniLiteral<"conditional">;
65
+ validate: z.ZodMiniFunction<z.ZodMiniTuple<[z.ZodMiniObject<{
66
+ args: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
67
+ flags: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
68
+ }, z.core.$strip>], null>, z.ZodMiniBoolean<boolean>>;
69
+ }, z.core.$strip>]>>;
70
+ type InvocationPolicy = z.infer<typeof InvocationPolicySchema>;
71
+ type ConditionalInvocationPolicy = z.infer<typeof CommandPolicyConditionalSchema>;
72
+ type CommandPolicy = z.infer<typeof CommandPolicySchema>;
73
+ /** A complete policy table, keyed by oclif command id. */
74
+ type CommandPolicySet = z.infer<typeof CommandPolicySetSchema>;
75
+ /** Where an invocation originates; selects the policy to enforce. */
76
+ type InvocationSource = 'mcp';
77
+ /**
78
+ * The policies a plugin declares for the commands it contributes, keyed by
79
+ * invocation source. A source left out denies every command for that source.
80
+ *
81
+ * Declared by pointing at the module from the plugin's package.json:
82
+ *
83
+ * ```json
84
+ * {"sanity": {"invocationPolicies": "./dist/invocationPolicies.js"}}
85
+ * ```
86
+ *
87
+ * The module must provide this table as a named `invocationPolicies` export.
88
+ * It is resolved once per plugin, so root help stays cheap, and it is code
89
+ * rather than JSON so conditional policies can inspect parsed invocations.
90
+ *
91
+ * Two limits apply, and neither is negotiable by the declaring plugin:
92
+ * entries for commands the plugin does not contribute are ignored, and a
93
+ * command the hosting CLI already governs keeps the CLI's own policy. A
94
+ * declaration is a request to expose surface, not a grant.
95
+ */
96
+ type PluginInvocationPolicies = Partial<Record<InvocationSource, CommandPolicySet>>;
97
+ /** Every valid invocation of the command is safe. */
98
+ declare const allow: CommandPolicy;
99
+ /** No invocation of the command is safe. Behaves like an unknown command. */
100
+ declare const deny: CommandPolicy;
101
+ /**
102
+ * Conditional policies to deny flags. The flags are also hidden
103
+ * from rendered help, so hosts are never told about surface they cannot use.
104
+ */
105
+ declare function conditionalDenyFlags(...names: string[]): ConditionalInvocationPolicy;
106
+ /**
107
+ * Conditional policy combining {@link conditionalDenyFlags} with an extra
108
+ * predicate on the parsed invocation, for conditions a flag name alone
109
+ * cannot express — e.g. flag values that would read from the host machine.
110
+ * `deniedFlags` are hidden from rendered help; the predicate is not
111
+ * expressible there, so flags it constrains stay advertised.
112
+ */
113
+ declare function conditionalPolicy(options: {
114
+ deniedFlags?: string[];
115
+ validate: InvocationPolicy;
116
+ }): ConditionalInvocationPolicy;
117
+ /**
118
+ * Type-checked identity helper for authoring a plugin's policy module.
119
+ *
120
+ * ```ts
121
+ * import {allow, definePluginInvocationPolicies, deny} from '@sanity/cli-core/commandPolicy'
122
+ *
123
+ * export const invocationPolicies = definePluginInvocationPolicies({
124
+ * mcp: {
125
+ * 'widgets:list': allow,
126
+ * // Reads widget definitions from the local filesystem.
127
+ * 'widgets:push': deny,
128
+ * },
129
+ * })
130
+ * ```
131
+ */
132
+ declare function definePluginInvocationPolicies(policies: PluginInvocationPolicies): PluginInvocationPolicies;
133
+ /**
134
+ * Identified by shape rather than by identity, because a plugin's policies are
135
+ * built against its own copy of this module.
136
+ *
137
+ * `deniedFlags` is checked as well as `kind`, so callers that read it off the
138
+ * narrowed type cannot be handed an object that only claims to be conditional.
139
+ */
140
+ declare function isConditionalInvocationPolicy(policy: CommandPolicy): policy is ConditionalInvocationPolicy;
141
+ /**
142
+ * Whether an arbitrary value is a usable policy table. Plugin policy modules
143
+ * are third-party code loaded at runtime, so their shape is verified rather
144
+ * than trusted; anything that does not match is treated as no declaration at
145
+ * all, which denies the plugin's commands.
146
+ */
147
+ declare function isCommandPolicySet(value: unknown): value is CommandPolicySet;
148
+ export { CommandPolicy, CommandPolicySet, InvocationSource, PluginInvocationPolicies, allow, conditionalDenyFlags, conditionalPolicy, definePluginInvocationPolicies, deny, isCommandPolicySet, isConditionalInvocationPolicy };
149
+ //# sourceMappingURL=commandPolicy.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from '../commandPolicy.js';
2
+
3
+ //# sourceMappingURL=commandPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/_exports/commandPolicy.ts"],"sourcesContent":["export * from '../commandPolicy.js'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB"}
@@ -18,7 +18,7 @@ import { a as isCi, i as isInteractive, n as normalizePath, o as importModule, r
18
18
  import { a as getLocalPackageVersion, i as getLocalPackageDir, n as resolveLocalPackageFrom, r as resolveLocalPackagePath, t as resolveLocalPackage } from "../resolveLocalPackage-Dr-TNTyk.js";
19
19
  import { n as ReadPackageJsonOptions, r as readPackageJson, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
20
20
  import { n as colorizeJson, t as getTimer } from "../timer-Dwu2TIgB.js";
21
- import { i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-BUfBJffI.js";
21
+ import { i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-DDpPtgia.js";
22
22
  import { WorkerOptions } from "node:worker_threads";
23
23
  interface PromisifyWorkerOptions extends WorkerOptions {
24
24
  /**
@@ -1,2 +1,2 @@
1
- import { a as cliConfigSchema, i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-BUfBJffI.js";
1
+ import { a as cliConfigSchema, i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-DDpPtgia.js";
2
2
  export { type CoreAppManifest, type StudioManifest, cliConfigSchema, coreAppManifestSchema, studioManifestSchema };
@@ -5,5 +5,5 @@ import { n as RequireProps, r as SanityOrgUser, t as Output } from "../types-CwJ
5
5
  import { SanityCommandInterface } from "../SanityCommand.js";
6
6
  import { t as ApplicationType } from "../workbenchApp-DVKwpTyU.js";
7
7
  import { n as ReadPackageJsonOptions, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
8
- import { n as StudioManifest, t as CoreAppManifest } from "../schemas-BUfBJffI.js";
8
+ import { n as StudioManifest, t as CoreAppManifest } from "../schemas-DDpPtgia.js";
9
9
  export type { ApplicationType, CLITelemetryStore, CliConfig, ConfigStore, ConsentInformation, CoreAppManifest, Output, PackageJson, ProjectRootResult, ReactCompilerConfig, ReadPackageJsonOptions, RequireProps, SanityCommandInterface, SanityOrgUser, StudioManifest, TelemetryUserProperties, TypeGenConfig, UserViteConfig };
@@ -0,0 +1,115 @@
1
+ import { z } from 'zod/mini';
2
+ /**
3
+ * The contract for exposing CLI commands to programmatic invocation sources,
4
+ * such as the remote MCP server.
5
+ *
6
+ * A command reaches a programmatic caller only when it satisfies both halves
7
+ * of this contract:
8
+ *
9
+ * 1. **Capability.** The command must be runnable in isolation, which means
10
+ * extending `SanityCommand` (see `@sanity/cli-core/SanityCommand`). That
11
+ * base class supplies `runInExecutionContext()` and routes output, token
12
+ * resolution, interactivity, and project discovery through the CLI
13
+ * execution context. A command extending oclif's `Command` directly cannot
14
+ * be invoked programmatically, no matter what policy it declares.
15
+ * 2. **Policy.** Something must state that the invocation is safe. For the
16
+ * `@sanity/cli` package's own commands that statement lives in the CLI. A
17
+ * plugin states it for its own commands by declaring a policy module (see
18
+ * {@link PluginInvocationPolicies}).
19
+ *
20
+ * Anything not covered by both halves is denied. The absence of a policy is
21
+ * never read as permission.
22
+ */ /** The command invocation a conditional policy is evaluated against. */ const InvocationPolicySchema = z.function({
23
+ input: [
24
+ z.object({
25
+ args: z.record(z.string(), z.unknown()),
26
+ flags: z.record(z.string(), z.unknown())
27
+ })
28
+ ],
29
+ output: z.boolean()
30
+ });
31
+ // A conditional entry must carry the deniedFlags list for the help renderer
32
+ // to omit them from the advertised command surface.
33
+ const CommandPolicyConditionalSchema = z.object({
34
+ deniedFlags: z.array(z.string()),
35
+ kind: z.literal('conditional'),
36
+ validate: InvocationPolicySchema
37
+ });
38
+ const CommandPolicySchema = z.union([
39
+ z.object({
40
+ kind: z.enum([
41
+ 'allow',
42
+ 'deny'
43
+ ]),
44
+ validate: InvocationPolicySchema
45
+ }),
46
+ CommandPolicyConditionalSchema
47
+ ]);
48
+ const CommandPolicySetSchema = z.record(z.string(), CommandPolicySchema);
49
+ /** Every valid invocation of the command is safe. */ export const allow = {
50
+ kind: 'allow',
51
+ validate: ()=>true
52
+ };
53
+ /** No invocation of the command is safe. Behaves like an unknown command. */ export const deny = {
54
+ kind: 'deny',
55
+ validate: ()=>false
56
+ };
57
+ /**
58
+ * Conditional policies to deny flags. The flags are also hidden
59
+ * from rendered help, so hosts are never told about surface they cannot use.
60
+ */ export function conditionalDenyFlags(...names) {
61
+ return {
62
+ deniedFlags: names,
63
+ kind: 'conditional',
64
+ validate: ({ flags })=>names.every((name)=>flags[name] === undefined || flags[name] === false)
65
+ };
66
+ }
67
+ /**
68
+ * Conditional policy combining {@link conditionalDenyFlags} with an extra
69
+ * predicate on the parsed invocation, for conditions a flag name alone
70
+ * cannot express — e.g. flag values that would read from the host machine.
71
+ * `deniedFlags` are hidden from rendered help; the predicate is not
72
+ * expressible there, so flags it constrains stay advertised.
73
+ */ export function conditionalPolicy(options) {
74
+ const denyFlags = conditionalDenyFlags(...options.deniedFlags ?? []);
75
+ return {
76
+ ...denyFlags,
77
+ validate: (invocation)=>denyFlags.validate(invocation) && options.validate(invocation)
78
+ };
79
+ }
80
+ /**
81
+ * Type-checked identity helper for authoring a plugin's policy module.
82
+ *
83
+ * ```ts
84
+ * import {allow, definePluginInvocationPolicies, deny} from '@sanity/cli-core/commandPolicy'
85
+ *
86
+ * export const invocationPolicies = definePluginInvocationPolicies({
87
+ * mcp: {
88
+ * 'widgets:list': allow,
89
+ * // Reads widget definitions from the local filesystem.
90
+ * 'widgets:push': deny,
91
+ * },
92
+ * })
93
+ * ```
94
+ */ export function definePluginInvocationPolicies(policies) {
95
+ return policies;
96
+ }
97
+ /**
98
+ * Identified by shape rather than by identity, because a plugin's policies are
99
+ * built against its own copy of this module.
100
+ *
101
+ * `deniedFlags` is checked as well as `kind`, so callers that read it off the
102
+ * narrowed type cannot be handed an object that only claims to be conditional.
103
+ */ export function isConditionalInvocationPolicy(policy) {
104
+ return CommandPolicyConditionalSchema.safeParse(policy).success;
105
+ }
106
+ /**
107
+ * Whether an arbitrary value is a usable policy table. Plugin policy modules
108
+ * are third-party code loaded at runtime, so their shape is verified rather
109
+ * than trusted; anything that does not match is treated as no declaration at
110
+ * all, which denies the plugin's commands.
111
+ */ export function isCommandPolicySet(value) {
112
+ return CommandPolicySetSchema.safeParse(value).success;
113
+ }
114
+
115
+ //# sourceMappingURL=commandPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commandPolicy.ts"],"sourcesContent":["import {z} from 'zod/mini'\n\n/**\n * The contract for exposing CLI commands to programmatic invocation sources,\n * such as the remote MCP server.\n *\n * A command reaches a programmatic caller only when it satisfies both halves\n * of this contract:\n *\n * 1. **Capability.** The command must be runnable in isolation, which means\n * extending `SanityCommand` (see `@sanity/cli-core/SanityCommand`). That\n * base class supplies `runInExecutionContext()` and routes output, token\n * resolution, interactivity, and project discovery through the CLI\n * execution context. A command extending oclif's `Command` directly cannot\n * be invoked programmatically, no matter what policy it declares.\n * 2. **Policy.** Something must state that the invocation is safe. For the\n * `@sanity/cli` package's own commands that statement lives in the CLI. A\n * plugin states it for its own commands by declaring a policy module (see\n * {@link PluginInvocationPolicies}).\n *\n * Anything not covered by both halves is denied. The absence of a policy is\n * never read as permission.\n */\n\n/** The command invocation a conditional policy is evaluated against. */\nconst InvocationPolicySchema = z.function({\n input: [\n z.object({\n args: z.record(z.string(), z.unknown()),\n flags: z.record(z.string(), z.unknown()),\n }),\n ],\n output: z.boolean(),\n})\n\n// A conditional entry must carry the deniedFlags list for the help renderer\n// to omit them from the advertised command surface.\nconst CommandPolicyConditionalSchema = z.object({\n deniedFlags: z.array(z.string()),\n kind: z.literal('conditional'),\n validate: InvocationPolicySchema,\n})\n\nconst CommandPolicySchema = z.union([\n z.object({\n kind: z.enum(['allow', 'deny']),\n validate: InvocationPolicySchema,\n }),\n CommandPolicyConditionalSchema,\n])\n\nconst CommandPolicySetSchema = z.record(z.string(), CommandPolicySchema)\n\ntype InvocationPolicy = z.infer<typeof InvocationPolicySchema>\n\ntype ConditionalInvocationPolicy = z.infer<typeof CommandPolicyConditionalSchema>\n\nexport type CommandPolicy = z.infer<typeof CommandPolicySchema>\n\n/** A complete policy table, keyed by oclif command id. */\nexport type CommandPolicySet = z.infer<typeof CommandPolicySetSchema>\n\n/** Where an invocation originates; selects the policy to enforce. */\nexport type InvocationSource = 'mcp'\n\n/**\n * The policies a plugin declares for the commands it contributes, keyed by\n * invocation source. A source left out denies every command for that source.\n *\n * Declared by pointing at the module from the plugin's package.json:\n *\n * ```json\n * {\"sanity\": {\"invocationPolicies\": \"./dist/invocationPolicies.js\"}}\n * ```\n *\n * The module must provide this table as a named `invocationPolicies` export.\n * It is resolved once per plugin, so root help stays cheap, and it is code\n * rather than JSON so conditional policies can inspect parsed invocations.\n *\n * Two limits apply, and neither is negotiable by the declaring plugin:\n * entries for commands the plugin does not contribute are ignored, and a\n * command the hosting CLI already governs keeps the CLI's own policy. A\n * declaration is a request to expose surface, not a grant.\n */\nexport type PluginInvocationPolicies = Partial<Record<InvocationSource, CommandPolicySet>>\n\n/** Every valid invocation of the command is safe. */\nexport const allow: CommandPolicy = {kind: 'allow', validate: () => true}\n\n/** No invocation of the command is safe. Behaves like an unknown command. */\nexport const deny: CommandPolicy = {kind: 'deny', validate: () => false}\n\n/**\n * Conditional policies to deny flags. The flags are also hidden\n * from rendered help, so hosts are never told about surface they cannot use.\n */\nexport function conditionalDenyFlags(...names: string[]): ConditionalInvocationPolicy {\n return {\n deniedFlags: names,\n kind: 'conditional',\n validate: ({flags}) =>\n names.every((name) => flags[name] === undefined || flags[name] === false),\n }\n}\n\n/**\n * Conditional policy combining {@link conditionalDenyFlags} with an extra\n * predicate on the parsed invocation, for conditions a flag name alone\n * cannot express — e.g. flag values that would read from the host machine.\n * `deniedFlags` are hidden from rendered help; the predicate is not\n * expressible there, so flags it constrains stay advertised.\n */\nexport function conditionalPolicy(options: {\n deniedFlags?: string[]\n validate: InvocationPolicy\n}): ConditionalInvocationPolicy {\n const denyFlags = conditionalDenyFlags(...(options.deniedFlags ?? []))\n return {\n ...denyFlags,\n validate: (invocation) => denyFlags.validate(invocation) && options.validate(invocation),\n }\n}\n\n/**\n * Type-checked identity helper for authoring a plugin's policy module.\n *\n * ```ts\n * import {allow, definePluginInvocationPolicies, deny} from '@sanity/cli-core/commandPolicy'\n *\n * export const invocationPolicies = definePluginInvocationPolicies({\n * mcp: {\n * 'widgets:list': allow,\n * // Reads widget definitions from the local filesystem.\n * 'widgets:push': deny,\n * },\n * })\n * ```\n */\nexport function definePluginInvocationPolicies(\n policies: PluginInvocationPolicies,\n): PluginInvocationPolicies {\n return policies\n}\n\n/**\n * Identified by shape rather than by identity, because a plugin's policies are\n * built against its own copy of this module.\n *\n * `deniedFlags` is checked as well as `kind`, so callers that read it off the\n * narrowed type cannot be handed an object that only claims to be conditional.\n */\nexport function isConditionalInvocationPolicy(\n policy: CommandPolicy,\n): policy is ConditionalInvocationPolicy {\n return CommandPolicyConditionalSchema.safeParse(policy).success\n}\n\n/**\n * Whether an arbitrary value is a usable policy table. Plugin policy modules\n * are third-party code loaded at runtime, so their shape is verified rather\n * than trusted; anything that does not match is treated as no declaration at\n * all, which denies the plugin's commands.\n */\nexport function isCommandPolicySet(value: unknown): value is CommandPolicySet {\n return CommandPolicySetSchema.safeParse(value).success\n}\n"],"names":["z","InvocationPolicySchema","function","input","object","args","record","string","unknown","flags","output","boolean","CommandPolicyConditionalSchema","deniedFlags","array","kind","literal","validate","CommandPolicySchema","union","enum","CommandPolicySetSchema","allow","deny","conditionalDenyFlags","names","every","name","undefined","conditionalPolicy","options","denyFlags","invocation","definePluginInvocationPolicies","policies","isConditionalInvocationPolicy","policy","safeParse","success","isCommandPolicySet","value"],"mappings":"AAAA,SAAQA,CAAC,QAAO,WAAU;AAE1B;;;;;;;;;;;;;;;;;;;;CAoBC,GAED,sEAAsE,GACtE,MAAMC,yBAAyBD,EAAEE,QAAQ,CAAC;IACxCC,OAAO;QACLH,EAAEI,MAAM,CAAC;YACPC,MAAML,EAAEM,MAAM,CAACN,EAAEO,MAAM,IAAIP,EAAEQ,OAAO;YACpCC,OAAOT,EAAEM,MAAM,CAACN,EAAEO,MAAM,IAAIP,EAAEQ,OAAO;QACvC;KACD;IACDE,QAAQV,EAAEW,OAAO;AACnB;AAEA,4EAA4E;AAC5E,oDAAoD;AACpD,MAAMC,iCAAiCZ,EAAEI,MAAM,CAAC;IAC9CS,aAAab,EAAEc,KAAK,CAACd,EAAEO,MAAM;IAC7BQ,MAAMf,EAAEgB,OAAO,CAAC;IAChBC,UAAUhB;AACZ;AAEA,MAAMiB,sBAAsBlB,EAAEmB,KAAK,CAAC;IAClCnB,EAAEI,MAAM,CAAC;QACPW,MAAMf,EAAEoB,IAAI,CAAC;YAAC;YAAS;SAAO;QAC9BH,UAAUhB;IACZ;IACAW;CACD;AAED,MAAMS,yBAAyBrB,EAAEM,MAAM,CAACN,EAAEO,MAAM,IAAIW;AAmCpD,mDAAmD,GACnD,OAAO,MAAMI,QAAuB;IAACP,MAAM;IAASE,UAAU,IAAM;AAAI,EAAC;AAEzE,2EAA2E,GAC3E,OAAO,MAAMM,OAAsB;IAACR,MAAM;IAAQE,UAAU,IAAM;AAAK,EAAC;AAExE;;;CAGC,GACD,OAAO,SAASO,qBAAqB,GAAGC,KAAe;IACrD,OAAO;QACLZ,aAAaY;QACbV,MAAM;QACNE,UAAU,CAAC,EAACR,KAAK,EAAC,GAChBgB,MAAMC,KAAK,CAAC,CAACC,OAASlB,KAAK,CAACkB,KAAK,KAAKC,aAAanB,KAAK,CAACkB,KAAK,KAAK;IACvE;AACF;AAEA;;;;;;CAMC,GACD,OAAO,SAASE,kBAAkBC,OAGjC;IACC,MAAMC,YAAYP,wBAAyBM,QAAQjB,WAAW,IAAI,EAAE;IACpE,OAAO;QACL,GAAGkB,SAAS;QACZd,UAAU,CAACe,aAAeD,UAAUd,QAAQ,CAACe,eAAeF,QAAQb,QAAQ,CAACe;IAC/E;AACF;AAEA;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC,+BACdC,QAAkC;IAElC,OAAOA;AACT;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,8BACdC,MAAqB;IAErB,OAAOxB,+BAA+ByB,SAAS,CAACD,QAAQE,OAAO;AACjE;AAEA;;;;;CAKC,GACD,OAAO,SAASC,mBAAmBC,KAAc;IAC/C,OAAOnB,uBAAuBgB,SAAS,CAACG,OAAOF,OAAO;AACxD"}
@@ -18,7 +18,10 @@ import { APP_VISIBILITIES } from './types/cliConfig.js';
18
18
  autoUpdates: z.optional(z.boolean()),
19
19
  deployment: z.optional(z.object({
20
20
  appId: z.optional(z.string()),
21
- autoUpdates: z.optional(z.boolean())
21
+ autoUpdates: z.optional(z.boolean()),
22
+ studioHost: z.optional(z.never({
23
+ error: 'deployment.studioHost is not supported. Move studioHost to the top level of sanity.cli.ts, or pass --url <hostname> to sanity deploy.'
24
+ }))
22
25
  })),
23
26
  graphql: z.optional(z.array(z.object({
24
27
  filterSuffix: z.optional(z.string()),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {z} from 'zod/mini'\n\nimport {\n APP_VISIBILITIES,\n type CliConfig,\n type ReactCompilerConfig,\n type TypeGenConfig,\n} from './types/cliConfig.js'\nimport {type UserViteConfig} from './types/userViteConfig'\n\n/**\n * @public\n */\nexport const cliConfigSchema = z.object({\n api: z.optional(\n z.object({\n dataset: z.optional(z.string()),\n projectId: z.optional(z.string()),\n }),\n ),\n\n app: z.optional(\n z.object({\n entry: z.optional(z.string()),\n icon: z.optional(z.string()),\n id: z.optional(z.string()),\n organizationId: z.optional(z.string()),\n title: z.optional(z.string()),\n visibility: z.optional(z.enum(APP_VISIBILITIES)),\n }),\n ),\n\n autoUpdates: z.optional(z.boolean()),\n\n deployment: z.optional(\n z.object({\n appId: z.optional(z.string()),\n autoUpdates: z.optional(z.boolean()),\n }),\n ),\n\n graphql: z.optional(\n z.array(\n z.object({\n filterSuffix: z.optional(z.string()),\n generation: z.optional(z.enum(['gen1', 'gen2', 'gen3'])),\n id: z.optional(z.string()),\n nonNullDocumentFields: z.optional(z.boolean()),\n playground: z.optional(z.boolean()),\n source: z.optional(z.string()),\n tag: z.optional(z.string()),\n workspace: z.optional(z.string()),\n }),\n ),\n ),\n\n mediaLibrary: z.optional(\n z.object({\n aspectsPath: z.optional(z.string()),\n }),\n ),\n\n project: z.optional(\n z.object({\n basePath: z.optional(z.string()),\n }),\n ),\n\n reactCompiler: z.optional(z.custom<boolean | ReactCompilerConfig>()),\n\n reactStrictMode: z.optional(z.boolean()),\n\n schemaExtraction: z.optional(\n z.object({\n enabled: z.optional(z.boolean()),\n enforceRequiredFields: z.optional(z.boolean()),\n path: z.optional(z.string()),\n watchPatterns: z.optional(z.array(z.string())),\n workspace: z.optional(z.string()),\n }),\n ),\n\n server: z.optional(\n z.object({\n hostname: z.optional(z.string()),\n port: z.optional(z.number()),\n }),\n ),\n\n studioHost: z.optional(z.string()),\n\n unstable_bundledDev: z.optional(z.boolean()),\n\n vite: z.optional(z.custom<UserViteConfig>()),\n\n typegen: z.optional(z.custom<Partial<TypeGenConfig> & {enabled?: boolean}>()),\n}) satisfies z.core.$ZodType<CliConfig>\n"],"names":["z","APP_VISIBILITIES","cliConfigSchema","object","api","optional","dataset","string","projectId","app","entry","icon","id","organizationId","title","visibility","enum","autoUpdates","boolean","deployment","appId","graphql","array","filterSuffix","generation","nonNullDocumentFields","playground","source","tag","workspace","mediaLibrary","aspectsPath","project","basePath","reactCompiler","custom","reactStrictMode","schemaExtraction","enabled","enforceRequiredFields","path","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AEK,QAAQ,CAACL,EAAEmC,MAAM;AAC9B,GAAuC"}
1
+ {"version":3,"sources":["../../../src/config/cli/schemas.ts"],"sourcesContent":["import {z} from 'zod/mini'\n\nimport {\n APP_VISIBILITIES,\n type CliConfig,\n type ReactCompilerConfig,\n type TypeGenConfig,\n} from './types/cliConfig.js'\nimport {type UserViteConfig} from './types/userViteConfig'\n\n/**\n * @public\n */\nexport const cliConfigSchema = z.object({\n api: z.optional(\n z.object({\n dataset: z.optional(z.string()),\n projectId: z.optional(z.string()),\n }),\n ),\n\n app: z.optional(\n z.object({\n entry: z.optional(z.string()),\n icon: z.optional(z.string()),\n id: z.optional(z.string()),\n organizationId: z.optional(z.string()),\n title: z.optional(z.string()),\n visibility: z.optional(z.enum(APP_VISIBILITIES)),\n }),\n ),\n\n autoUpdates: z.optional(z.boolean()),\n\n deployment: z.optional(\n z.object({\n appId: z.optional(z.string()),\n autoUpdates: z.optional(z.boolean()),\n studioHost: z.optional(\n z.never({\n error:\n 'deployment.studioHost is not supported. Move studioHost to the top level of sanity.cli.ts, or pass --url <hostname> to sanity deploy.',\n }),\n ),\n }),\n ),\n\n graphql: z.optional(\n z.array(\n z.object({\n filterSuffix: z.optional(z.string()),\n generation: z.optional(z.enum(['gen1', 'gen2', 'gen3'])),\n id: z.optional(z.string()),\n nonNullDocumentFields: z.optional(z.boolean()),\n playground: z.optional(z.boolean()),\n source: z.optional(z.string()),\n tag: z.optional(z.string()),\n workspace: z.optional(z.string()),\n }),\n ),\n ),\n\n mediaLibrary: z.optional(\n z.object({\n aspectsPath: z.optional(z.string()),\n }),\n ),\n\n project: z.optional(\n z.object({\n basePath: z.optional(z.string()),\n }),\n ),\n\n reactCompiler: z.optional(z.custom<boolean | ReactCompilerConfig>()),\n\n reactStrictMode: z.optional(z.boolean()),\n\n schemaExtraction: z.optional(\n z.object({\n enabled: z.optional(z.boolean()),\n enforceRequiredFields: z.optional(z.boolean()),\n path: z.optional(z.string()),\n watchPatterns: z.optional(z.array(z.string())),\n workspace: z.optional(z.string()),\n }),\n ),\n\n server: z.optional(\n z.object({\n hostname: z.optional(z.string()),\n port: z.optional(z.number()),\n }),\n ),\n\n studioHost: z.optional(z.string()),\n\n unstable_bundledDev: z.optional(z.boolean()),\n\n vite: z.optional(z.custom<UserViteConfig>()),\n\n typegen: z.optional(z.custom<Partial<TypeGenConfig> & {enabled?: boolean}>()),\n}) satisfies z.core.$ZodType<CliConfig>\n"],"names":["z","APP_VISIBILITIES","cliConfigSchema","object","api","optional","dataset","string","projectId","app","entry","icon","id","organizationId","title","visibility","enum","autoUpdates","boolean","deployment","appId","studioHost","never","error","graphql","array","filterSuffix","generation","nonNullDocumentFields","playground","source","tag","workspace","mediaLibrary","aspectsPath","project","basePath","reactCompiler","custom","reactStrictMode","schemaExtraction","enabled","enforceRequiredFields","path","watchPatterns","server","hostname","port","number","unstable_bundledDev","vite","typegen"],"mappings":"AAAA,SAAQA,CAAC,QAAO,WAAU;AAE1B,SACEC,gBAAgB,QAIX,uBAAsB;AAG7B;;CAEC,GACD,OAAO,MAAMC,kBAAkBF,EAAEG,MAAM,CAAC;IACtCC,KAAKJ,EAAEK,QAAQ,CACbL,EAAEG,MAAM,CAAC;QACPG,SAASN,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QAC5BC,WAAWR,EAAEK,QAAQ,CAACL,EAAEO,MAAM;IAChC;IAGFE,KAAKT,EAAEK,QAAQ,CACbL,EAAEG,MAAM,CAAC;QACPO,OAAOV,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QAC1BI,MAAMX,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QACzBK,IAAIZ,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QACvBM,gBAAgBb,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QACnCO,OAAOd,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QAC1BQ,YAAYf,EAAEK,QAAQ,CAACL,EAAEgB,IAAI,CAACf;IAChC;IAGFgB,aAAajB,EAAEK,QA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C7BwB,uBAAuB1C,EAAEK,QAAQ,CAACL,EAAEkB,OAAO;QAC3CyB,MAAM3C,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QACzBqC,eAAe5C,EAAEK,QAAQ,CAACL,EAAEyB,KAAK,CAACzB,EAAEO,MAAM;QAC1CyB,WAAWhC,EAAEK,QAAQ,CAACL,EAAEO,MAAM;IAChC;IAGFsC,QAAQ7C,EAAEK,QAAQ,CAChBL,EAAEG,MAAM,CAAC;QACP2C,UAAU9C,EAAEK,QAAQ,CAACL,EAAEO,MAAM;QAC7BwC,MAAM/C,EAAEK,QAAQ,CAACL,EAAEgD,MAAM;IAC3B;IAGF3B,YAAYrB,EAAEK,QAAQ,CAACL,EAAEO,MAAM;IAE/B0C,qBAAqBjD,EAAEK,QAAQ,CAACL,EAAEkB,OAAO;IAEzCgC,MAAMlD,EAAEK,QAAQ,CAACL,EAAEsC,MAAM;IAEzBa,SAASnD,EAAEK,QAAQ,CAACL,EAAEsC,MAAM;AAC9B,GAAuC"}
@@ -24,6 +24,7 @@ declare const cliConfigSchema: z.ZodMiniObject<{
24
24
  deployment: z.ZodMiniOptional<z.ZodMiniObject<{
25
25
  appId: z.ZodMiniOptional<z.ZodMiniString<string>>;
26
26
  autoUpdates: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
27
+ studioHost: z.ZodMiniOptional<z.ZodMiniNever>;
27
28
  }, z.core.$strip>>;
28
29
  graphql: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
29
30
  filterSuffix: z.ZodMiniOptional<z.ZodMiniString<string>>;
@@ -103,4 +104,4 @@ type CoreAppManifest = z.infer<typeof coreAppManifestSchema>;
103
104
  declare const studioManifestSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
104
105
  type StudioManifest = z.infer<typeof studioManifestSchema>;
105
106
  export { cliConfigSchema as a, studioManifestSchema as i, StudioManifest as n, coreAppManifestSchema as r, CoreAppManifest as t };
106
- //# sourceMappingURL=schemas-BUfBJffI.d.ts.map
107
+ //# sourceMappingURL=schemas-DDpPtgia.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli-core",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "description": "Sanity CLI core package",
5
5
  "keywords": [
6
6
  "cli",
@@ -41,6 +41,10 @@
41
41
  "source": "./src/_exports/browser.ts",
42
42
  "default": "./dist/_exports/browser.js"
43
43
  },
44
+ "./commandPolicy": {
45
+ "source": "./src/_exports/commandPolicy.ts",
46
+ "default": "./dist/_exports/commandPolicy.js"
47
+ },
44
48
  "./config": {
45
49
  "source": "./src/_exports/config.ts",
46
50
  "default": "./dist/_exports/config.js"
@@ -117,20 +121,20 @@
117
121
  "dependencies": {
118
122
  "@inquirer/prompts": "^8.5.2",
119
123
  "@oclif/core": "^4.11.14",
120
- "@sanity/client": "^8.5.0",
124
+ "@sanity/client": "^8.6.2",
121
125
  "boxen": "^8.0.1",
122
126
  "empathic": "^2.0.1",
123
- "get-it": "^9.5.2",
127
+ "get-it": "^9.5.4",
124
128
  "get-tsconfig": "^4.14.3",
125
129
  "import-meta-resolve": "^4.2.0",
126
130
  "jiti": "^2.7.0",
127
131
  "jsdom": "^29.1.1",
128
132
  "json-lexer": "^1.2.0",
129
133
  "log-symbols": "^7.0.1",
130
- "obug": "^2.1.4",
134
+ "obug": "^3.0.0",
131
135
  "ora": "^9.0.0",
132
136
  "rxjs": "^7.8.2",
133
- "vite": "^8.2.2",
137
+ "vite": "^8.3.0",
134
138
  "wrap-ansi": "^9.0.2",
135
139
  "zod": "^4.5.2"
136
140
  },
@@ -149,7 +153,7 @@
149
153
  "eslint": "^10.7.0",
150
154
  "oxc-transform-react": "^0.147.0",
151
155
  "publint": "^0.3.21",
152
- "sanity": "^6.12.0",
156
+ "sanity": "^6.15.0",
153
157
  "typescript": "^6.0.3",
154
158
  "vitest": "^4.1.11"
155
159
  },