@valbuild/mcp 0.147.0 → 0.148.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @valbuild/mcp
2
2
 
3
+ ## 0.148.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @valbuild/server@0.148.1
9
+
10
+ ## 0.148.0
11
+
12
+ ### Patch Changes
13
+
14
+ - [#818](https://github.com/valbuild/val/pull/818) [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1) Thanks [@freekh](https://github.com/freekh)! - Remote files are now addressed on the host the project's settings name. For a
15
+ project hosted by Val, that is the project's own address, and its remote images
16
+ and files are served from there rather than from `remote.val.build`. Every other
17
+ project is unchanged.
18
+
19
+ - The Studio, `val validate --fix` and the MCP image tool all take the host from
20
+ the project's settings, falling back to `remote.val.build` as before.
21
+ - Re-reading a remote file whose recorded size or type is out of date keeps it
22
+ on the host it was on.
23
+ - When a remote file's host cannot be reached, tooling downloads it from the
24
+ project's permanent `<id>.valstart.dev` address instead, and keeps it only if
25
+ its bytes match the file the address names.
26
+
27
+ - Updated dependencies [[`df5544c`](https://github.com/valbuild/val/commit/df5544c6e92a4c3a52765630c9de191e854ee723), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1), [`562d032`](https://github.com/valbuild/val/commit/562d03280c3fcf97a80562e8b017dd2125ac4ad1)]:
28
+ - @valbuild/server@0.148.0
29
+ - @valbuild/shared@0.148.0
30
+ - @valbuild/core@0.148.0
31
+
3
32
  ## 0.147.0
4
33
 
5
34
  ### Patch Changes
@@ -40,6 +40,8 @@ export type RemoteSettingsLoader = () => Promise<{
40
40
  status: "success";
41
41
  publicProjectId: string;
42
42
  buckets: string[];
43
+ /** The host new refs name, when the project's settings say. */
44
+ remoteHost?: string;
43
45
  } | ValToolError>;
44
46
  export declare function createRemoteSettingsLoader(options: ValServerConfig): RemoteSettingsLoader;
45
47
  export declare function nextBucket(buckets: string[]): string;
@@ -2366,11 +2366,13 @@ function _load() {
2366
2366
  }
2367
2367
  return _context.a(2, err("internal", "The project ".concat(options.project, " has no remote file buckets configured, so there is nowhere to put a remote image.")));
2368
2368
  case 6:
2369
- return _context.a(2, {
2369
+ return _context.a(2, _objectSpread2({
2370
2370
  status: "success",
2371
2371
  publicProjectId: settings.data.publicProjectId,
2372
2372
  buckets: buckets
2373
- });
2373
+ }, settings.data.remoteHost !== undefined ? {
2374
+ remoteHost: settings.data.remoteHost
2375
+ } : {}));
2374
2376
  }
2375
2377
  }, _callee);
2376
2378
  }));
@@ -2397,6 +2399,7 @@ function resolveRemoteUploadTarget(_x2) {
2397
2399
  */
2398
2400
  function _resolveRemoteUploadTarget() {
2399
2401
  _resolveRemoteUploadTarget = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2(loadSettings) {
2402
+ var _settings$remoteHost;
2400
2403
  var settings, coreVersion;
2401
2404
  return asyncToGenerator._regenerator().w(function (_context2) {
2402
2405
  while (1) switch (_context2.n) {
@@ -2424,11 +2427,13 @@ function _resolveRemoteUploadTarget() {
2424
2427
  publicProjectId: settings.publicProjectId,
2425
2428
  bucket: nextBucket(settings.buckets),
2426
2429
  coreVersion: coreVersion,
2427
- // Read the way `val validate --fix` reads it. Deliberately not from
2428
- // `ValConfig`, which has no such field: the remote host is where Val's
2429
- // own file service lives rather than something a project configures, and
2430
- // the env var is the escape hatch for pointing at another one.
2431
- remoteHost: process.env.VAL_REMOTE_HOST || core.DEFAULT_VAL_REMOTE_HOST
2430
+ // The project's settings say, because they also say where the bytes
2431
+ // go: a Hosted project's are in R2 and served at its own address, and a
2432
+ // ref naming another host would point at nothing. Otherwise read the way
2433
+ // `val validate --fix` reads it -- deliberately not from `ValConfig`,
2434
+ // which has no such field: the env var is the escape hatch for pointing
2435
+ // at another file service.
2436
+ remoteHost: (_settings$remoteHost = settings.remoteHost) !== null && _settings$remoteHost !== void 0 ? _settings$remoteHost : process.env.VAL_REMOTE_HOST || core.DEFAULT_VAL_REMOTE_HOST
2432
2437
  }
2433
2438
  });
2434
2439
  }
@@ -3383,7 +3388,7 @@ var packageJson = {
3383
3388
  "./package.json": "./package.json"
3384
3389
  },
3385
3390
  types: "dist/valbuild-mcp.cjs.d.ts",
3386
- version: "0.147.0",
3391
+ version: "0.148.1",
3387
3392
  scripts: {
3388
3393
  typecheck: "tsc --noEmit",
3389
3394
  test: "jest",
@@ -2366,11 +2366,13 @@ function _load() {
2366
2366
  }
2367
2367
  return _context.a(2, err("internal", "The project ".concat(options.project, " has no remote file buckets configured, so there is nowhere to put a remote image.")));
2368
2368
  case 6:
2369
- return _context.a(2, {
2369
+ return _context.a(2, _objectSpread2({
2370
2370
  status: "success",
2371
2371
  publicProjectId: settings.data.publicProjectId,
2372
2372
  buckets: buckets
2373
- });
2373
+ }, settings.data.remoteHost !== undefined ? {
2374
+ remoteHost: settings.data.remoteHost
2375
+ } : {}));
2374
2376
  }
2375
2377
  }, _callee);
2376
2378
  }));
@@ -2397,6 +2399,7 @@ function resolveRemoteUploadTarget(_x2) {
2397
2399
  */
2398
2400
  function _resolveRemoteUploadTarget() {
2399
2401
  _resolveRemoteUploadTarget = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2(loadSettings) {
2402
+ var _settings$remoteHost;
2400
2403
  var settings, coreVersion;
2401
2404
  return asyncToGenerator._regenerator().w(function (_context2) {
2402
2405
  while (1) switch (_context2.n) {
@@ -2424,11 +2427,13 @@ function _resolveRemoteUploadTarget() {
2424
2427
  publicProjectId: settings.publicProjectId,
2425
2428
  bucket: nextBucket(settings.buckets),
2426
2429
  coreVersion: coreVersion,
2427
- // Read the way `val validate --fix` reads it. Deliberately not from
2428
- // `ValConfig`, which has no such field: the remote host is where Val's
2429
- // own file service lives rather than something a project configures, and
2430
- // the env var is the escape hatch for pointing at another one.
2431
- remoteHost: process.env.VAL_REMOTE_HOST || core.DEFAULT_VAL_REMOTE_HOST
2430
+ // The project's settings say, because they also say where the bytes
2431
+ // go: a Hosted project's are in R2 and served at its own address, and a
2432
+ // ref naming another host would point at nothing. Otherwise read the way
2433
+ // `val validate --fix` reads it -- deliberately not from `ValConfig`,
2434
+ // which has no such field: the env var is the escape hatch for pointing
2435
+ // at another file service.
2436
+ remoteHost: (_settings$remoteHost = settings.remoteHost) !== null && _settings$remoteHost !== void 0 ? _settings$remoteHost : process.env.VAL_REMOTE_HOST || core.DEFAULT_VAL_REMOTE_HOST
2432
2437
  }
2433
2438
  });
2434
2439
  }
@@ -3383,7 +3388,7 @@ var packageJson = {
3383
3388
  "./package.json": "./package.json"
3384
3389
  },
3385
3390
  types: "dist/valbuild-mcp.cjs.d.ts",
3386
- version: "0.147.0",
3391
+ version: "0.148.1",
3387
3392
  scripts: {
3388
3393
  typecheck: "tsc --noEmit",
3389
3394
  test: "jest",
@@ -2357,11 +2357,13 @@ function _load() {
2357
2357
  }
2358
2358
  return _context.a(2, err("internal", "The project ".concat(options.project, " has no remote file buckets configured, so there is nowhere to put a remote image.")));
2359
2359
  case 6:
2360
- return _context.a(2, {
2360
+ return _context.a(2, _objectSpread2({
2361
2361
  status: "success",
2362
2362
  publicProjectId: settings.data.publicProjectId,
2363
2363
  buckets: buckets
2364
- });
2364
+ }, settings.data.remoteHost !== undefined ? {
2365
+ remoteHost: settings.data.remoteHost
2366
+ } : {}));
2365
2367
  }
2366
2368
  }, _callee);
2367
2369
  }));
@@ -2388,6 +2390,7 @@ function resolveRemoteUploadTarget(_x2) {
2388
2390
  */
2389
2391
  function _resolveRemoteUploadTarget() {
2390
2392
  _resolveRemoteUploadTarget = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(loadSettings) {
2393
+ var _settings$remoteHost;
2391
2394
  var settings, coreVersion;
2392
2395
  return _regenerator().w(function (_context2) {
2393
2396
  while (1) switch (_context2.n) {
@@ -2415,11 +2418,13 @@ function _resolveRemoteUploadTarget() {
2415
2418
  publicProjectId: settings.publicProjectId,
2416
2419
  bucket: nextBucket(settings.buckets),
2417
2420
  coreVersion: coreVersion,
2418
- // Read the way `val validate --fix` reads it. Deliberately not from
2419
- // `ValConfig`, which has no such field: the remote host is where Val's
2420
- // own file service lives rather than something a project configures, and
2421
- // the env var is the escape hatch for pointing at another one.
2422
- remoteHost: process.env.VAL_REMOTE_HOST || DEFAULT_VAL_REMOTE_HOST
2421
+ // The project's settings say, because they also say where the bytes
2422
+ // go: a Hosted project's are in R2 and served at its own address, and a
2423
+ // ref naming another host would point at nothing. Otherwise read the way
2424
+ // `val validate --fix` reads it -- deliberately not from `ValConfig`,
2425
+ // which has no such field: the env var is the escape hatch for pointing
2426
+ // at another file service.
2427
+ remoteHost: (_settings$remoteHost = settings.remoteHost) !== null && _settings$remoteHost !== void 0 ? _settings$remoteHost : process.env.VAL_REMOTE_HOST || DEFAULT_VAL_REMOTE_HOST
2423
2428
  }
2424
2429
  });
2425
2430
  }
@@ -3374,7 +3379,7 @@ var packageJson = {
3374
3379
  "./package.json": "./package.json"
3375
3380
  },
3376
3381
  types: "dist/valbuild-mcp.cjs.d.ts",
3377
- version: "0.147.0",
3382
+ version: "0.148.1",
3378
3383
  scripts: {
3379
3384
  typecheck: "tsc --noEmit",
3380
3385
  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.147.0",
23
+ "version": "0.148.1",
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.147.0",
35
- "@valbuild/server": "0.147.0",
36
- "@valbuild/shared": "0.147.0"
34
+ "@valbuild/core": "0.148.0",
35
+ "@valbuild/server": "0.148.1",
36
+ "@valbuild/shared": "0.148.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@prettier/sync": "^0.6.1",