@rainbow-robotics/muscat-plugin-kit 1.10.4-dev.0 → 1.10.4-dev.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/README.ko.md CHANGED
@@ -1028,7 +1028,7 @@ sudo apt update && sudo apt install rainbow-rb-sdk-dev
1028
1028
 
1029
1029
  - 이미 `:10000`을 노출하는 컨테이너(`muscat`, `muscat-dev` 등)가 있으면 재사용합니다. kit이 띄우지 않은 컨테이너는 플러그인 포트를 노출하지 않습니다.
1030
1030
  - 컨테이너 없이 그 포트를 이미 쓰는 Muscat(로봇 PC, host networking)이 있으면 그대로 씁니다.
1031
- - 없으면 `muscat-pk-muscat`을 띄웁니다 — `common`(+ `--sim`에 필요한 서비스)과 MediaMTX(`8554`, `8889`, `8189`)를 돌리는 S3 런타임 이미지(`muscat-pk-runtime:<version>`, `version.json` 기준)이며 `~/.muscat-pk/muscat/`에 캐시됩니다. 노출할 플러그인 포트나 서비스가 바뀌면 다시 만들고, Muscat 새 버전이 나오면 이전 이미지를 교체합니다.
1031
+ - 없으면 `muscat-pk-muscat`을 띄웁니다 — `common`(+ `--sim`에 필요한 서비스)과 MediaMTX(`8554`, `8889`, `8189`)를 돌리는 S3 런타임 이미지(`muscat-pk-runtime:<version>`, `version.json` 기준)이며 `~/.muscat-pk/muscat/`에 캐시됩니다. 노출할 플러그인 포트나 서비스가 바뀌면 다시 만들고, Muscat 새 버전이 나오면 이전 이미지를 교체합니다. 데이터(DB, 로그, 프로그램)는 컨테이너 안에만 있어서 컨테이너를 새로 만들면 비어 있습니다.
1032
1032
  - `dev`는 종료할 때 자신이 띄운 `muscat-pk-muscat`을 지웁니다. `dev:ui` 단독으로 띄운 것은 계속 떠 있습니다.
1033
1033
  - 백엔드는 로컬 Muscat의 network namespace에 붙으므로 `execute`와 SDK가 로봇에서처럼 닿습니다.
1034
1034
 
package/README.md CHANGED
@@ -1028,7 +1028,7 @@ Without a robot IP (or against a robot that runs no Muscat), `dev` / `dev:ui` ne
1028
1028
 
1029
1029
  - reuses any container already publishing `:10000` (`muscat`, `muscat-dev`, …). A container not started by the kit does not publish the plugin's ports;
1030
1030
  - uses a Muscat already listening on those ports without a container (robot PC, host networking);
1031
- - otherwise starts `muscat-pk-muscat` — the S3 runtime image (`muscat-pk-runtime:<version>`, from `version.json`) running `common` (plus the services `--sim` needs) and MediaMTX (`8554`, `8889`, `8189`), cached in `~/.muscat-pk/muscat/`. It is recreated when the published plugin ports or services change, and a new Muscat version replaces the old image.
1031
+ - otherwise starts `muscat-pk-muscat` — the S3 runtime image (`muscat-pk-runtime:<version>`, from `version.json`) running `common` (plus the services `--sim` needs) and MediaMTX (`8554`, `8889`, `8189`), cached in `~/.muscat-pk/muscat/`. It is recreated when the published plugin ports or services change, and a new Muscat version replaces the old image. Its data (DB, logs, programs) lives in the container only, so a new container starts empty.
1032
1032
  - `dev` removes its own `muscat-pk-muscat` on exit; started by `dev:ui` alone it keeps running.
1033
1033
  - The backend joins the local Muscat's network namespace, so `execute` and the SDK reach it like on the robot.
1034
1034
 
@@ -140,11 +140,13 @@ function ensureNetwork() {
140
140
  // listen-endpoints file opens both to the network. Sims reach common as muscat-pk-muscat:7447, and
141
141
  // gossip has them dial each service back — on loopback only the sim that happened to connect first
142
142
  // answers manipulate's receive_one.
143
- function writeZenohListen(open) {
144
- const file = resolve(CACHE, "data", "zenoh_listen_endpoints.json5");
145
- if (!open) return rmSync(file, { force: true });
143
+ // Mounted as the only file of /app/data; the rest of the runtime's data stays in the container.
144
+ function zenohListenMount(open) {
145
+ if (!open) return [];
146
+ const file = resolve(CACHE, "zenoh_listen_endpoints.json5");
146
147
  mkdirSync(dirname(file), { recursive: true });
147
148
  writeFileSync(file, `{\n common: ["tcp/0.0.0.0:7447"],\n service: ["tcp/0.0.0.0:0"],\n}\n`);
149
+ return ["-v", `${file}:/app/data/zenoh_listen_endpoints.json5:ro`];
148
150
  }
149
151
 
150
152
  async function waitForApi(timeoutMs = 180_000) {
@@ -249,7 +251,8 @@ export async function ensureLocalMuscat({ pluginPorts = [], zenohPort = null, se
249
251
  const svcMounts = [];
250
252
  for (const s of svcs) svcMounts.push("-v", `${await ensureServiceBinary(s, versions.services[s].version)}:/app/services/${s}`);
251
253
  ensureNetwork();
252
- writeZenohListen(services.length > 0);
254
+ // Earlier kits kept DB, logs and programs here across runs.
255
+ rmSync(resolve(CACHE, "data"), { recursive: true, force: true });
253
256
 
254
257
  let media = true;
255
258
  for (const port of MEDIA_PORTS) if (await isPortInUse(port)) media = false;
@@ -270,7 +273,7 @@ export async function ensureLocalMuscat({ pluginPorts = [], zenohPort = null, se
270
273
  "-e", "RB_RUNTIME_ENABLE_ZENOH_BRIDGE=0",
271
274
  ...envFlags,
272
275
  ...svcMounts,
273
- "-v", `${resolve(CACHE, "data")}:/app/data`,
276
+ ...zenohListenMount(services.length > 0),
274
277
  "-p", `127.0.0.1:${API_PORT}:${API_PORT}`,
275
278
  "-p", `127.0.0.1:${GATEWAY_PORT}:${GATEWAY_PORT}`,
276
279
  ...(media ? mediaPortFlags() : []),
@@ -1 +1 @@
1
- {"generatedAt":1793172604703,"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":1793173800402,"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}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainbow-robotics/muscat-plugin-kit",
3
- "version": "1.10.4-dev.0",
3
+ "version": "1.10.4-dev.1",
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": "1.10.4-dev.0",
57
- "@rainbow-robotics/preview-host": "1.10.4-dev.0",
56
+ "@rainbow-robotics/plugin-ui": "1.10.4-dev.1",
57
+ "@rainbow-robotics/preview-host": "1.10.4-dev.1",
58
58
  "@types/react": "^19.0.10",
59
59
  "postcss": "^8.5.8",
60
60
  "typescript": "^5.8.0",