@valbuild/mcp 0.144.12 → 0.145.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @valbuild/mcp
2
2
 
3
+ ## 0.145.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#859](https://github.com/valbuild/val/pull/859) [`f085be0`](https://github.com/valbuild/val/commit/f085be0eb5bdc195e9d8cdb15dd5f8acfdabe23c) Thanks [@freekh](https://github.com/freekh)! - An edit Val Build refuses to save because of the project's plan — the Free plan's 1,000 changes a week are used, or a Hosted trial has ended — is now kept in the Studio instead of being reverted.
8
+
9
+ - `PUT /patches` answers such a save with a `403` of type `plan-refused`, carrying Val Build's reason and fix as data and which patches of the request it did save. It used to answer `400 patch-error`, which the Studio reads as a bad patch and drops.
10
+ - The Studio keeps the refused edits and any made after them, shows the plan notice with **Upgrade** or **Add a card** beside it, and saves them by itself once the plan allows it: as soon as Val Build says editing is open again (an owner added a card, the week moved on), and otherwise by trying again now and then. A publish or a restore that meets held edits says why, in Val Build's words, instead of suggesting the connection.
11
+ - The MCP write tools answer a refused write as `forbidden`, with Val Build's sentence, instead of `internal`.
12
+
13
+ - Updated dependencies [[`b6cb939`](https://github.com/valbuild/val/commit/b6cb9395d8bdcd5182e9c6ba84f5284930de2fa5), [`f085be0`](https://github.com/valbuild/val/commit/f085be0eb5bdc195e9d8cdb15dd5f8acfdabe23c)]:
14
+ - @valbuild/core@0.145.0
15
+ - @valbuild/shared@0.145.0
16
+ - @valbuild/server@0.145.0
17
+
3
18
  ## 0.144.12
4
19
 
5
20
  ### Patch Changes
@@ -1439,7 +1439,7 @@ function _savePatch() {
1439
1439
  attempt = 0;
1440
1440
  case 10:
1441
1441
  if (!(attempt < 2)) {
1442
- _context4.n = 18;
1442
+ _context4.n = 19;
1443
1443
  break;
1444
1444
  }
1445
1445
  if (!(attempt > 0)) {
@@ -1480,8 +1480,18 @@ function _savePatch() {
1480
1480
  _context4.n = 16;
1481
1481
  break;
1482
1482
  }
1483
- return _context4.a(3, 17);
1483
+ return _context4.a(3, 18);
1484
1484
  case 16:
1485
+ if (!(saved.error.errorType === "plan-refused")) {
1486
+ _context4.n = 17;
1487
+ break;
1488
+ }
1489
+ return _context4.a(2, {
1490
+ status: "error",
1491
+ code: "forbidden",
1492
+ message: saved.error.error.message
1493
+ });
1494
+ case 17:
1485
1495
  return _context4.a(2, {
1486
1496
  status: "error",
1487
1497
  code: "internal",
@@ -1489,11 +1499,11 @@ function _savePatch() {
1489
1499
  // `{ errorType: "other", error: <that> }`.
1490
1500
  message: saved.error.error.message
1491
1501
  });
1492
- case 17:
1502
+ case 18:
1493
1503
  attempt++;
1494
1504
  _context4.n = 10;
1495
1505
  break;
1496
- case 18:
1506
+ case 19:
1497
1507
  return _context4.a(2, {
1498
1508
  status: "error",
1499
1509
  code: "conflict",
@@ -3373,7 +3383,7 @@ var packageJson = {
3373
3383
  "./package.json": "./package.json"
3374
3384
  },
3375
3385
  types: "dist/valbuild-mcp.cjs.d.ts",
3376
- version: "0.144.12",
3386
+ version: "0.145.0",
3377
3387
  scripts: {
3378
3388
  typecheck: "tsc --noEmit",
3379
3389
  test: "jest",
@@ -1439,7 +1439,7 @@ function _savePatch() {
1439
1439
  attempt = 0;
1440
1440
  case 10:
1441
1441
  if (!(attempt < 2)) {
1442
- _context4.n = 18;
1442
+ _context4.n = 19;
1443
1443
  break;
1444
1444
  }
1445
1445
  if (!(attempt > 0)) {
@@ -1480,8 +1480,18 @@ function _savePatch() {
1480
1480
  _context4.n = 16;
1481
1481
  break;
1482
1482
  }
1483
- return _context4.a(3, 17);
1483
+ return _context4.a(3, 18);
1484
1484
  case 16:
1485
+ if (!(saved.error.errorType === "plan-refused")) {
1486
+ _context4.n = 17;
1487
+ break;
1488
+ }
1489
+ return _context4.a(2, {
1490
+ status: "error",
1491
+ code: "forbidden",
1492
+ message: saved.error.error.message
1493
+ });
1494
+ case 17:
1485
1495
  return _context4.a(2, {
1486
1496
  status: "error",
1487
1497
  code: "internal",
@@ -1489,11 +1499,11 @@ function _savePatch() {
1489
1499
  // `{ errorType: "other", error: <that> }`.
1490
1500
  message: saved.error.error.message
1491
1501
  });
1492
- case 17:
1502
+ case 18:
1493
1503
  attempt++;
1494
1504
  _context4.n = 10;
1495
1505
  break;
1496
- case 18:
1506
+ case 19:
1497
1507
  return _context4.a(2, {
1498
1508
  status: "error",
1499
1509
  code: "conflict",
@@ -3373,7 +3383,7 @@ var packageJson = {
3373
3383
  "./package.json": "./package.json"
3374
3384
  },
3375
3385
  types: "dist/valbuild-mcp.cjs.d.ts",
3376
- version: "0.144.12",
3386
+ version: "0.145.0",
3377
3387
  scripts: {
3378
3388
  typecheck: "tsc --noEmit",
3379
3389
  test: "jest",
@@ -1430,7 +1430,7 @@ function _savePatch() {
1430
1430
  attempt = 0;
1431
1431
  case 10:
1432
1432
  if (!(attempt < 2)) {
1433
- _context4.n = 18;
1433
+ _context4.n = 19;
1434
1434
  break;
1435
1435
  }
1436
1436
  if (!(attempt > 0)) {
@@ -1471,8 +1471,18 @@ function _savePatch() {
1471
1471
  _context4.n = 16;
1472
1472
  break;
1473
1473
  }
1474
- return _context4.a(3, 17);
1474
+ return _context4.a(3, 18);
1475
1475
  case 16:
1476
+ if (!(saved.error.errorType === "plan-refused")) {
1477
+ _context4.n = 17;
1478
+ break;
1479
+ }
1480
+ return _context4.a(2, {
1481
+ status: "error",
1482
+ code: "forbidden",
1483
+ message: saved.error.error.message
1484
+ });
1485
+ case 17:
1476
1486
  return _context4.a(2, {
1477
1487
  status: "error",
1478
1488
  code: "internal",
@@ -1480,11 +1490,11 @@ function _savePatch() {
1480
1490
  // `{ errorType: "other", error: <that> }`.
1481
1491
  message: saved.error.error.message
1482
1492
  });
1483
- case 17:
1493
+ case 18:
1484
1494
  attempt++;
1485
1495
  _context4.n = 10;
1486
1496
  break;
1487
- case 18:
1497
+ case 19:
1488
1498
  return _context4.a(2, {
1489
1499
  status: "error",
1490
1500
  code: "conflict",
@@ -3364,7 +3374,7 @@ var packageJson = {
3364
3374
  "./package.json": "./package.json"
3365
3375
  },
3366
3376
  types: "dist/valbuild-mcp.cjs.d.ts",
3367
- version: "0.144.12",
3377
+ version: "0.145.0",
3368
3378
  scripts: {
3369
3379
  typecheck: "tsc --noEmit",
3370
3380
  test: "jest",
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./package.json": "./package.json"
21
21
  },
22
22
  "types": "dist/valbuild-mcp.cjs.d.ts",
23
- "version": "0.144.12",
23
+ "version": "0.145.0",
24
24
  "preconstruct": {
25
25
  "entrypoints": [
26
26
  "./index.ts",
@@ -31,9 +31,9 @@
31
31
  "dependencies": {
32
32
  "minimatch": "^10.2.6",
33
33
  "zod": "^4.4.3",
34
- "@valbuild/core": "0.144.0",
35
- "@valbuild/server": "0.144.12",
36
- "@valbuild/shared": "0.144.9"
34
+ "@valbuild/core": "0.145.0",
35
+ "@valbuild/server": "0.145.0",
36
+ "@valbuild/shared": "0.145.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@prettier/sync": "^0.6.1",