@valbuild/mcp 0.124.0 → 0.125.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,91 @@
1
1
  # @valbuild/mcp
2
2
 
3
+ ## 0.125.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#638](https://github.com/valbuild/val/pull/638) [`c390397`](https://github.com/valbuild/val/commit/c390397cb5e203eb1bedae3a6fab15726e850b90) Thanks [@freekh](https://github.com/freekh)! - Val now runs on TanStack Start.
8
+
9
+ `@valbuild/tanstack` is a new package with everything `@valbuild/next` has: Val
10
+ Studio at `/val`, the on-page overlay and canvas, draft mode, the client hooks,
11
+ server-side content reads, images, and the MCP tools.
12
+
13
+ ```sh
14
+ npm install @valbuild/tanstack
15
+ ```
16
+
17
+ ```ts
18
+ // val.config.ts
19
+ import { initVal } from "@valbuild/tanstack";
20
+ const { s, c, config, tanstackRouter } = initVal({ project: "org/project" });
21
+ ```
22
+
23
+ **Routes are first class.** A Val module for a route is named after the route
24
+ file it sits beside — `src/routes/posts.$postId.tsx` is served content by
25
+ `src/routes/posts.$postId.val.ts` — and its keys are the URLs that route serves:
26
+
27
+ ```ts
28
+ export default c.define(
29
+ "/src/routes/posts.$postId.val.ts",
30
+ s.router(tanstackRouter, s.object({ title: s.string() })),
31
+ { "/posts/hello-world": { title: "Hello world" } },
32
+ );
33
+ ```
34
+
35
+ `.` and `/` both separate segments, `$param` is a parameter, `$` is a splat, and
36
+ `index`, `route`, `(groups)` and `_pathless` layouts add no URL segment — the
37
+ same rules TanStack Router uses for the route file itself. Val validates every
38
+ key against that pattern, and Val Studio shows these modules as a sitemap under
39
+ **Pages**, where an editor can add a page.
40
+
41
+ Point the route generator away from your content files, in `vite.config.ts` and
42
+ `tsr.config.json`:
43
+
44
+ ```ts
45
+ tanstackStart({ router: { routeFileIgnorePattern: "\\.val\\.[tj]sx?$" } });
46
+ ```
47
+
48
+ See the [README](https://github.com/valbuild/val/blob/main/packages/tanstack/README.md)
49
+ for the full wiring, and `examples/tanstack` for a working app.
50
+
51
+ **Also fixed, for everyone:** `Internal.VERSION.core` was `null` in any ESM
52
+ bundle — it was read with `require("../package.json")` inside a `try`, so the
53
+ failure was silent. That version goes into every remote file ref and proxy mode
54
+ refuses to start without it. Every package now reads its version through a
55
+ static JSON import, which is inlined at build time.
56
+
57
+ Two smaller fixes that came out of running the whole toolchain against a
58
+ TanStack project:
59
+
60
+ - `val versions` reports `@valbuild/tanstack`, and `val debug` writes a snapshot
61
+ that names whichever framework package the captured project actually has.
62
+ - `@valbuild/eslint-plugin` reads a `tsconfig.json` that has comments in it. A
63
+ tsconfig is JSONC, and `JSON.parse` is not — so on any project whose tsconfig
64
+ carries a comment (the TanStack starter's does) the
65
+ `module-in-val-modules` rule threw `Expected double-quoted property name in
66
+ JSON` on the first file and took the whole lint run with it.
67
+
68
+ Three fixes found by driving the Studio against a real TanStack app:
69
+
70
+ - **A draft image now loads on the page.** The source the Studio pushes to the
71
+ host page carries `patch_id` for any file whose bytes are still in a patch, so
72
+ the page asks `/api/val/files/...?patch_id=` rather than a `/public` path that
73
+ nothing has written yet. This was silent — the image just did not appear — and
74
+ it affects any page that reads media through the hooks rather than on the
75
+ server, `@valbuild/next` included.
76
+ - **A splat route no longer logs an error on every render.** TanStack returns
77
+ both `_splat` and `*` for the same parameter; Val reported the second as a
78
+ parameter it could not place in the path.
79
+ - The TanStack example and starter render a 404 page instead of throwing
80
+ `notFound()` from a component, which escaped to the error boundary and logged
81
+ `Error in renderToReadableStream` (and, with no not-found component
82
+ configured, aborted the response) on every miss.
83
+
84
+ - Updated dependencies [[`c390397`](https://github.com/valbuild/val/commit/c390397cb5e203eb1bedae3a6fab15726e850b90)]:
85
+ - @valbuild/core@0.125.0
86
+ - @valbuild/shared@0.125.0
87
+ - @valbuild/server@0.125.0
88
+
3
89
  ## 0.124.0
4
90
 
5
91
  ### Patch Changes
@@ -3338,14 +3338,75 @@ function fromBuildResult(built) {
3338
3338
  return err("invalid-args", built.message);
3339
3339
  }
3340
3340
 
3341
- var VERSION = function () {
3342
- try {
3343
- // eslint-disable-next-line @typescript-eslint/no-require-imports
3344
- return require("../package.json").version;
3345
- } catch (_unused) {
3346
- return null;
3347
- }
3348
- }();
3341
+ var packageJson = {
3342
+ name: "@valbuild/mcp",
3343
+ "private": false,
3344
+ description: "Val - content tools for MCP hosts",
3345
+ repository: {
3346
+ type: "git",
3347
+ url: "git+https://github.com/valbuild/val.git"
3348
+ },
3349
+ main: "dist/valbuild-mcp.cjs.js",
3350
+ module: "dist/valbuild-mcp.esm.js",
3351
+ exports: {
3352
+ ".": {
3353
+ module: "./dist/valbuild-mcp.esm.js",
3354
+ "default": "./dist/valbuild-mcp.cjs.js"
3355
+ },
3356
+ "./sharp": {
3357
+ module: "./sharp/dist/valbuild-mcp-sharp.esm.js",
3358
+ "default": "./sharp/dist/valbuild-mcp-sharp.cjs.js"
3359
+ },
3360
+ "./package.json": "./package.json"
3361
+ },
3362
+ types: "dist/valbuild-mcp.cjs.d.ts",
3363
+ version: "0.125.0",
3364
+ scripts: {
3365
+ typecheck: "tsc --noEmit",
3366
+ test: "jest",
3367
+ "test:watch": "jest --watch"
3368
+ },
3369
+ preconstruct: {
3370
+ entrypoints: [
3371
+ "./index.ts",
3372
+ "./sharp/index.ts"
3373
+ ],
3374
+ exports: true
3375
+ },
3376
+ dependencies: {
3377
+ "@valbuild/core": "workspace:*",
3378
+ "@valbuild/server": "workspace:*",
3379
+ "@valbuild/shared": "workspace:*",
3380
+ minimatch: "^10.2.6",
3381
+ zod: "^4.4.3"
3382
+ },
3383
+ devDependencies: {
3384
+ "@prettier/sync": "^0.6.1",
3385
+ "@types/jest": "^30.0.0",
3386
+ prettier: "~3.8.5",
3387
+ sharp: "^0.35.4",
3388
+ sucrase: "^3.35.1",
3389
+ typescript: "^6.0.3"
3390
+ },
3391
+ engines: {
3392
+ node: "^20.19.0 || >=22"
3393
+ },
3394
+ keywords: [
3395
+ "CMS",
3396
+ "mcp",
3397
+ "val",
3398
+ "valbuild"
3399
+ ],
3400
+ files: [
3401
+ "CHANGELOG.md",
3402
+ "dist",
3403
+ "sharp/dist",
3404
+ "sharp/package.json"
3405
+ ]
3406
+ };
3407
+
3408
+ var _packageJson$version;
3409
+ var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
3349
3410
 
3350
3411
  /**
3351
3412
  * Verifying an OAuth access token, which is the whole of what makes this app a
@@ -3338,14 +3338,75 @@ function fromBuildResult(built) {
3338
3338
  return err("invalid-args", built.message);
3339
3339
  }
3340
3340
 
3341
- var VERSION = function () {
3342
- try {
3343
- // eslint-disable-next-line @typescript-eslint/no-require-imports
3344
- return require("../package.json").version;
3345
- } catch (_unused) {
3346
- return null;
3347
- }
3348
- }();
3341
+ var packageJson = {
3342
+ name: "@valbuild/mcp",
3343
+ "private": false,
3344
+ description: "Val - content tools for MCP hosts",
3345
+ repository: {
3346
+ type: "git",
3347
+ url: "git+https://github.com/valbuild/val.git"
3348
+ },
3349
+ main: "dist/valbuild-mcp.cjs.js",
3350
+ module: "dist/valbuild-mcp.esm.js",
3351
+ exports: {
3352
+ ".": {
3353
+ module: "./dist/valbuild-mcp.esm.js",
3354
+ "default": "./dist/valbuild-mcp.cjs.js"
3355
+ },
3356
+ "./sharp": {
3357
+ module: "./sharp/dist/valbuild-mcp-sharp.esm.js",
3358
+ "default": "./sharp/dist/valbuild-mcp-sharp.cjs.js"
3359
+ },
3360
+ "./package.json": "./package.json"
3361
+ },
3362
+ types: "dist/valbuild-mcp.cjs.d.ts",
3363
+ version: "0.125.0",
3364
+ scripts: {
3365
+ typecheck: "tsc --noEmit",
3366
+ test: "jest",
3367
+ "test:watch": "jest --watch"
3368
+ },
3369
+ preconstruct: {
3370
+ entrypoints: [
3371
+ "./index.ts",
3372
+ "./sharp/index.ts"
3373
+ ],
3374
+ exports: true
3375
+ },
3376
+ dependencies: {
3377
+ "@valbuild/core": "workspace:*",
3378
+ "@valbuild/server": "workspace:*",
3379
+ "@valbuild/shared": "workspace:*",
3380
+ minimatch: "^10.2.6",
3381
+ zod: "^4.4.3"
3382
+ },
3383
+ devDependencies: {
3384
+ "@prettier/sync": "^0.6.1",
3385
+ "@types/jest": "^30.0.0",
3386
+ prettier: "~3.8.5",
3387
+ sharp: "^0.35.4",
3388
+ sucrase: "^3.35.1",
3389
+ typescript: "^6.0.3"
3390
+ },
3391
+ engines: {
3392
+ node: "^20.19.0 || >=22"
3393
+ },
3394
+ keywords: [
3395
+ "CMS",
3396
+ "mcp",
3397
+ "val",
3398
+ "valbuild"
3399
+ ],
3400
+ files: [
3401
+ "CHANGELOG.md",
3402
+ "dist",
3403
+ "sharp/dist",
3404
+ "sharp/package.json"
3405
+ ]
3406
+ };
3407
+
3408
+ var _packageJson$version;
3409
+ var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
3349
3410
 
3350
3411
  /**
3351
3412
  * Verifying an OAuth access token, which is the whole of what makes this app a
@@ -3329,14 +3329,75 @@ function fromBuildResult(built) {
3329
3329
  return err("invalid-args", built.message);
3330
3330
  }
3331
3331
 
3332
- var VERSION = function () {
3333
- try {
3334
- // eslint-disable-next-line @typescript-eslint/no-require-imports
3335
- return require("../package.json").version;
3336
- } catch (_unused) {
3337
- return null;
3338
- }
3339
- }();
3332
+ var packageJson = {
3333
+ name: "@valbuild/mcp",
3334
+ "private": false,
3335
+ description: "Val - content tools for MCP hosts",
3336
+ repository: {
3337
+ type: "git",
3338
+ url: "git+https://github.com/valbuild/val.git"
3339
+ },
3340
+ main: "dist/valbuild-mcp.cjs.js",
3341
+ module: "dist/valbuild-mcp.esm.js",
3342
+ exports: {
3343
+ ".": {
3344
+ module: "./dist/valbuild-mcp.esm.js",
3345
+ "default": "./dist/valbuild-mcp.cjs.js"
3346
+ },
3347
+ "./sharp": {
3348
+ module: "./sharp/dist/valbuild-mcp-sharp.esm.js",
3349
+ "default": "./sharp/dist/valbuild-mcp-sharp.cjs.js"
3350
+ },
3351
+ "./package.json": "./package.json"
3352
+ },
3353
+ types: "dist/valbuild-mcp.cjs.d.ts",
3354
+ version: "0.125.0",
3355
+ scripts: {
3356
+ typecheck: "tsc --noEmit",
3357
+ test: "jest",
3358
+ "test:watch": "jest --watch"
3359
+ },
3360
+ preconstruct: {
3361
+ entrypoints: [
3362
+ "./index.ts",
3363
+ "./sharp/index.ts"
3364
+ ],
3365
+ exports: true
3366
+ },
3367
+ dependencies: {
3368
+ "@valbuild/core": "workspace:*",
3369
+ "@valbuild/server": "workspace:*",
3370
+ "@valbuild/shared": "workspace:*",
3371
+ minimatch: "^10.2.6",
3372
+ zod: "^4.4.3"
3373
+ },
3374
+ devDependencies: {
3375
+ "@prettier/sync": "^0.6.1",
3376
+ "@types/jest": "^30.0.0",
3377
+ prettier: "~3.8.5",
3378
+ sharp: "^0.35.4",
3379
+ sucrase: "^3.35.1",
3380
+ typescript: "^6.0.3"
3381
+ },
3382
+ engines: {
3383
+ node: "^20.19.0 || >=22"
3384
+ },
3385
+ keywords: [
3386
+ "CMS",
3387
+ "mcp",
3388
+ "val",
3389
+ "valbuild"
3390
+ ],
3391
+ files: [
3392
+ "CHANGELOG.md",
3393
+ "dist",
3394
+ "sharp/dist",
3395
+ "sharp/package.json"
3396
+ ]
3397
+ };
3398
+
3399
+ var _packageJson$version;
3400
+ var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
3340
3401
 
3341
3402
  /**
3342
3403
  * Verifying an OAuth access token, which is the whole of what makes this app a
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.124.0",
23
+ "version": "0.125.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.124.0",
35
- "@valbuild/shared": "0.124.0",
36
- "@valbuild/server": "0.124.0"
34
+ "@valbuild/server": "0.125.0",
35
+ "@valbuild/core": "0.125.0",
36
+ "@valbuild/shared": "0.125.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@prettier/sync": "^0.6.1",