@rainbow-robotics/muscat-plugin-kit 0.10.1-dev.1 → 0.10.1-dev.2

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.
@@ -252,8 +252,11 @@ export async function ensureLocalMuscat({ pluginPorts = [], zenohPort = null, se
252
252
  const svcMounts = [];
253
253
  for (const s of svcs) svcMounts.push("-v", `${await ensureServiceBinary(s, versions.services[s].version)}:/app/services/${s}`);
254
254
  ensureNetwork();
255
- // Earlier kits kept DB, logs and programs here across runs.
256
- rmSync(resolve(CACHE, "data"), { recursive: true, force: true });
255
+ // Earlier kits kept DB, logs and programs here across runs. Files the container wrote can be
256
+ // undeletable from Windows ("cannot be accessed by the system"); nothing mounts it now, so leave them.
257
+ try {
258
+ rmSync(resolve(CACHE, "data"), { recursive: true, force: true });
259
+ } catch {}
257
260
 
258
261
  let media = true;
259
262
  for (const port of MEDIA_PORTS) if (await isPortInUse(port)) media = false;
package/cli/src/ros2.mjs CHANGED
@@ -37,16 +37,25 @@ export async function ensureImage(image = ROS2_DEV_IMAGE, { platform = null, roo
37
37
  if (root && (image === ROS2_DEV_IMAGE || image === `${ROS2_DEV_IMAGE}-${hostArch}`)) syncCppIde(root, image);
38
38
  }
39
39
 
40
+ const DOCKERFILE_LABEL = "com.rainbow-robotics.muscat-pk.dockerfile";
41
+
40
42
  async function buildImage(image, platform, root) {
41
43
  const dockerfile = await resolveDockerfile("Dockerfile.dev");
42
44
  const sdkVer = cppSdkVersion(root);
43
45
  const key = imageKey(dockerfile, sdkVer ?? "");
44
- if (canSkipImageBuild(image, key)) {
46
+ const dockerfileKey = imageKey(dockerfile);
47
+ // An rclpy project (no C++ pin) takes its SDK from PyPI, so the image an rclcpp project built
48
+ // with its pinned rb_sdk serves it too; otherwise switching between the two rebuilt it each time.
49
+ if (sdkVer ? canSkipImageBuild(image, key) : canSkipImageBuild(image, dockerfileKey, DOCKERFILE_LABEL)) {
45
50
  return;
46
51
  }
47
52
  log.step(`docker build -t ${image}${platform ? ` (${platform})` : ""} (first run is slow, then cached)…`);
48
53
  const platformFlags = platform ? ["--platform", platform] : [];
49
- const buildArgs = [...(sdkVer ? ["--build-arg", `RB_SDK_VERSION=${sdkVer}`] : []), ...imageKeyLabel(key)];
54
+ const buildArgs = [
55
+ ...(sdkVer ? ["--build-arg", `RB_SDK_VERSION=${sdkVer}`] : []),
56
+ ...imageKeyLabel(key),
57
+ "--label", `${DOCKERFILE_LABEL}=${dockerfileKey}`,
58
+ ];
50
59
  const r = spawnSync(
51
60
  "docker",
52
61
  ["build", ...buildCacheFlags(), ...platformFlags, ...buildArgs, "-t", image, "-f", dockerfile, dirname(dockerfile)],
package/cli/src/util.mjs CHANGED
@@ -351,11 +351,11 @@ export function imageKeyLabel(key) {
351
351
  return ["--label", `${IMAGE_KEY_LABEL}=${key}`];
352
352
  }
353
353
 
354
- export function canSkipImageBuild(image, key = null) {
354
+ export function canSkipImageBuild(image, key = null, label = IMAGE_KEY_LABEL) {
355
355
  if (process.env.MUSCAT_PK_REBUILD_IMAGE === "1") return false;
356
356
  if (!dockerImageExists(image)) return false;
357
357
  if (!key) return true;
358
- const r = spawnSync("docker", ["image", "inspect", "-f", `{{index .Config.Labels "${IMAGE_KEY_LABEL}"}}`, image], { encoding: "utf8" });
358
+ const r = spawnSync("docker", ["image", "inspect", "-f", `{{index .Config.Labels "${label}"}}`, image], { encoding: "utf8" });
359
359
  return r.status === 0 && r.stdout.trim() === key;
360
360
  }
361
361
 
@@ -1 +1 @@
1
- {"generatedAt":1793262550568,"userSince":1750932757926,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@vitest/browser":"3.2.4","@vitest/coverage-v8":"3.2.4","playwright":"1.59.1","vitest":"3.2.4"},"hasRouterPackage":false,"monorepo":"Turborepo","packageManager":{"type":"yarn","version":"berry","agent":"yarn@berry"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"8.6.18","storybookVersionSpecifier":"^8.6.4","language":"typescript","storybookPackages":{"@chromatic-com/storybook":{"version":"3.2.7"},"@storybook/addon-essentials":{"version":"8.6.18"},"@storybook/addon-links":{"version":"8.6.18"},"@storybook/addon-onboarding":{"version":"8.6.18"},"@storybook/addon-themes":{"version":"8.6.18"},"@storybook/blocks":{"version":"8.6.18"},"@storybook/experimental-addon-test":{"version":"8.6.18"},"@storybook/react":{"version":"8.6.18"},"@storybook/react-vite":{"version":"8.6.18"},"@storybook/test":{"version":"8.6.18"},"@storybook/theming":{"version":"8.6.18"},"eslint-plugin-storybook":{"version":"0.11.6"},"storybook":{"version":"8.6.18"},"storybook-addon-react-docgen":{"version":"1.2.44"}},"addons":{"$SNIP/node_modules/@storybook/addon-links":{"version":null},"$SNIP/node_modules/@storybook/addon-essentials":{"version":null},"$SNIP/node_modules/@chromatic-com/storybook":{"version":null},"$SNIP/node_modules/@storybook/addon-themes":{"version":null},"$SNIP/node_modules/@storybook/experimental-addon-test":{"version":null}}}
1
+ {"generatedAt":1793266991230,"userSince":1750932757926,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@vitest/browser":"3.2.4","@vitest/coverage-v8":"3.2.4","playwright":"1.59.1","vitest":"3.2.4"},"hasRouterPackage":false,"monorepo":"Turborepo","packageManager":{"type":"yarn","version":"berry","agent":"yarn@berry"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"8.6.18","storybookVersionSpecifier":"^8.6.4","language":"typescript","storybookPackages":{"@chromatic-com/storybook":{"version":"3.2.7"},"@storybook/addon-essentials":{"version":"8.6.18"},"@storybook/addon-links":{"version":"8.6.18"},"@storybook/addon-onboarding":{"version":"8.6.18"},"@storybook/addon-themes":{"version":"8.6.18"},"@storybook/blocks":{"version":"8.6.18"},"@storybook/experimental-addon-test":{"version":"8.6.18"},"@storybook/react":{"version":"8.6.18"},"@storybook/react-vite":{"version":"8.6.18"},"@storybook/test":{"version":"8.6.18"},"@storybook/theming":{"version":"8.6.18"},"eslint-plugin-storybook":{"version":"0.11.6"},"storybook":{"version":"8.6.18"},"storybook-addon-react-docgen":{"version":"1.2.44"}},"addons":{"$SNIP/node_modules/@storybook/addon-links":{"version":null},"$SNIP/node_modules/@storybook/addon-essentials":{"version":null},"$SNIP/node_modules/@chromatic-com/storybook":{"version":null},"$SNIP/node_modules/@storybook/addon-themes":{"version":null},"$SNIP/node_modules/@storybook/experimental-addon-test":{"version":null}}}
@@ -1,4 +1,4 @@
1
- rainbow-rb-sdk==0.10.4
2
- rainbow-rb-flat-buffers==0.10.4
3
- rainbow-rb-zenoh==0.10.4
1
+ rainbow-rb-sdk==0.10.5
2
+ rainbow-rb-flat-buffers==0.10.5
3
+ rainbow-rb-zenoh==0.10.5
4
4
  requests==2.34.2
@@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
7
7
  # Rainbow Robotics C++ SDK — provided by the apt package rainbow-rb-sdk-dev
8
8
  # (pre-installed in the muscat-pk dev container). The version here is the one the
9
9
  # dev container installs; change it with `muscat-pk sdk update <version>`.
10
- find_package(rb_sdk 0.10.4 EXACT REQUIRED)
10
+ find_package(rb_sdk 0.10.5 EXACT REQUIRED)
11
11
 
12
12
  # The executable name must match runtime.entry in manifest.json.
13
13
  add_executable(__PLUGIN_SLUG__ main.cpp)
@@ -244,7 +244,7 @@ don't install anything locally.
244
244
 
245
245
  ```cmake
246
246
  # cpp/CMakeLists.txt — the version is the SDK the dev container installs (muscat-pk sdk update <version>)
247
- find_package(rb_sdk 0.10.4 EXACT REQUIRED)
247
+ find_package(rb_sdk 0.10.5 EXACT REQUIRED)
248
248
  add_executable(__PLUGIN_SLUG__ main.cpp) # name must equal runtime.entry
249
249
  target_link_libraries(__PLUGIN_SLUG__ PRIVATE rb_sdk::rb_sdk)
250
250
  ```
@@ -10,7 +10,7 @@ find_package(rclcpp REQUIRED)
10
10
  # Rainbow Robotics C++ SDK (apt: rainbow-rb-sdk-dev, pre-installed in the dev
11
11
  # container). The version here is the one the dev container installs; change it
12
12
  # with `muscat-pk sdk update <version>`.
13
- find_package(rb_sdk 0.10.4 EXACT REQUIRED)
13
+ find_package(rb_sdk 0.10.5 EXACT REQUIRED)
14
14
 
15
15
  add_executable(__PLUGIN_SLUG___node src/node.cpp)
16
16
  ament_target_dependencies(__PLUGIN_SLUG___node rclcpp)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainbow-robotics/muscat-plugin-kit",
3
- "version": "0.10.1-dev.1",
3
+ "version": "0.10.1-dev.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -53,8 +53,8 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@modelcontextprotocol/sdk": "^1.29.0",
56
- "@rainbow-robotics/plugin-ui": "0.10.1-dev.1",
57
- "@rainbow-robotics/preview-host": "0.10.1-dev.1",
56
+ "@rainbow-robotics/plugin-ui": "0.10.1-dev.2",
57
+ "@rainbow-robotics/preview-host": "0.10.1-dev.2",
58
58
  "@types/react": "^19.0.10",
59
59
  "postcss": "^8.5.8",
60
60
  "typescript": "^5.8.0",