feat: AIGRO-4919 - Invoking allowed commands from outside the cli#1598
feat: AIGRO-4919 - Invoking allowed commands from outside the cli#1598mwritter wants to merge 6 commits into
Conversation
📦 Bundle Stats —
|
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 2.2 KB | - |
| Internal (gzip) | 838 B | - |
| Bundled (raw) | 11.20 MB | +641 B, +0.0% |
| Bundled (gzip) | 2.11 MB | +206 B, +0.0% |
| Import time | 876ms | -5ms, -0.5% |
bin:sanity
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.90 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 2.12s | +24ms, +1.1% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (efb5705b)
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 118.2 KB | +4.2 KB, +3.7% |
| Internal (gzip) | 30.3 KB | +1.1 KB, +3.9% |
| Bundled (raw) | 21.77 MB | +3.4 KB, +0.0% |
| Bundled (gzip) | 3.47 MB | +679 B, +0.0% |
| Import time | 786ms | +10ms, +1.3% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-build
Compared against main (efb5705b)
@sanity/cli-build/_internal/build
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 113.2 KB | - |
| Internal (gzip) | 28.7 KB | - |
| Bundled (raw) | 17.75 MB | +1014 B, +0.0% |
| Bundled (gzip) | 3.56 MB | +430 B, +0.0% |
| Import time | 1.15s | +3ms, +0.2% |
@sanity/cli-build/_internal/env
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 1.8 KB | - |
| Internal (gzip) | 644 B | - |
| Bundled (raw) | 1.31 MB | - |
| Bundled (gzip) | 333.8 KB | - |
| Import time | 128ms | -0ms, -0.0% |
@sanity/cli-build/_internal/extract
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 8.6 KB | - |
| Internal (gzip) | 2.7 KB | - |
| Bundled (raw) | 155.0 KB | - |
| Bundled (gzip) | 39.5 KB | - |
| Import time | 248ms | +0ms, +0.2% |
🗺️ ./_internal/env · ./_internal/extract · @sanity/cli-build:./_internal/build treemap too large to embed · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (efb5705b)
| Metric | Value | vs main (efb5705) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
Coverage Delta
Comparing 14 changed files against main @ Overall Coverage
|
| * @throws When the input contains an unterminated quote. | ||
| * @internal | ||
| */ | ||
| export function tokenizeCliArgs(input: string): string[] { |
There was a problem hiding this comment.
IMO, rather than keeping this in the CLI project, the MCP server should handle parsing the args. this keeps the bundle size smaller for the CLI
| ['cors add', CorsAdd], | ||
| ['cors delete', CorsDelete], | ||
| ['cors list', CorsList], | ||
| ['projects list', ProjectsList], |
There was a problem hiding this comment.
is there a way we can run commands programmatically without needing to define them all here? we want to specify the allowed commands in the MCP server, not the CLI.
Screenshots - Locally tested linking

clichanges tomellonand runningpnpm inspectfrommellon