Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e89a531
update muse skill related config
supnate Apr 4, 2026
e9ce6a1
use vite 8 in a normal plugin
supnate Apr 9, 2026
7fb1456
vite plugin for lib plugin
supnate Apr 13, 2026
ace0a3a
ignore .claude
supnate Apr 13, 2026
10bfb90
better handle lib plugin hmr and load
supnate Apr 14, 2026
17cebef
no hmr for entry file
supnate Apr 14, 2026
95dfeec
vite 8 for lib plugin poc
supnate Apr 19, 2026
4e0f48d
virtual entry poc
supnate Apr 20, 2026
9acdf03
use build as serve for lib plugins
supnate Apr 20, 2026
97b811a
implement built-in lib plugin server at dev time
supnate Apr 20, 2026
534826c
serial load lib
supnate Apr 21, 2026
6483771
refine lib server
supnate Apr 22, 2026
b62f88b
candidate code
supnate Apr 22, 2026
c44150f
MUSE-1243 add msp builder
supnate Apr 23, 2026
b2a6e52
Merge pull request #38 from supnate/MUSE-1243
supnate Apr 23, 2026
7eead66
MUSE-1252 added MSP mgmt API
supnate Apr 23, 2026
7bf664c
Merge pull request #39 from supnate/MUSE-1252
supnate Apr 23, 2026
5930f98
MUSE-1252 added sync latest API
supnate Apr 23, 2026
b3b829e
Merge pull request #40 from supnate/msp-dev
supnate Apr 23, 2026
897af45
MUSE-1253 add msp cli
supnate Apr 23, 2026
428a0f9
Merge pull request #41 from supnate/msp-dev
supnate Apr 23, 2026
9756f19
MUSE-1252 add msp registry schema
supnate Apr 23, 2026
c55ede0
Merge pull request #42 from supnate/msp-dev
supnate Apr 23, 2026
21ea253
MUSE-1244 upgrade tool and verified in a plugin
supnate Apr 23, 2026
339e335
Merge pull request #43 from supnate/msp-dev
supnate Apr 23, 2026
183f8ee
Merge branch 'main' into sdk-upgrade-poc
supnate Apr 28, 2026
0a38e31
MUSE-1265 update deps
supnate Apr 28, 2026
bb98baf
virtual entry try
supnate Apr 29, 2026
4e243b9
improve shared module registration
supnate Apr 29, 2026
e0e22cd
feat: boot plugin refine
supnate Apr 29, 2026
97c64f2
feat: add vite plugin for init and boot plugins
supnate Apr 29, 2026
4a6827e
chore: refine vanilla vite plugin
supnate Apr 29, 2026
1c08a37
add repo info in package.json
supnate Apr 30, 2026
0fb7687
refine vite plugins and muse boot
supnate Apr 30, 2026
06d1afa
refine muse-boot
supnate Apr 30, 2026
e0e9949
chore: wording refine
supnate Apr 30, 2026
35d739b
update muse-modules
supnate Apr 30, 2026
52a1f93
up libs to latest deps
supnate May 6, 2026
f33c7db
Merge pull request #44 from supnate/sdk-upgrade-dev
supnate May 6, 2026
739783c
Bump axios in /workspace/packages/muse-plugin-git-storage
dependabot[bot] May 6, 2026
fb51101
Bump simple-git from 3.26.0 to 3.36.0 in /workspace/packages/muse-runner
dependabot[bot] May 6, 2026
78b3ae6
add skill
supnate May 7, 2026
dba2d3e
Merge pull request #47 from supnate/skill-dev
supnate May 7, 2026
1834ea8
Merge pull request #46 from eBay/dependabot/npm_and_yarn/workspace/pa…
supnate May 8, 2026
61a7b90
Merge pull request #45 from eBay/dependabot/npm_and_yarn/workspace/pa…
supnate May 8, 2026
aacc192
fix lib react build
supnate May 8, 2026
dbad440
Merge pull request #48 from supnate/sdk-upgrade-dev
supnate May 8, 2026
a22a3ca
deprecate webpack
supnate May 8, 2026
181ccae
up version for vite 8 upgrade
supnate May 8, 2026
d70b399
Merge pull request #50 from supnate/sdk-upgrade-dev
supnate May 8, 2026
47aacd4
Bump axios from 1.7.7 to 1.15.2 in /workspace/packages/muse-client
dependabot[bot] May 8, 2026
f4eba06
update actions node version
supnate May 8, 2026
0fa4290
Merge pull request #52 from supnate/sdk-upgrade-dev
supnate May 8, 2026
037e963
Merge pull request #51 from eBay/dependabot/npm_and_yarn/workspace/pa…
supnate May 8, 2026
472999a
remove cra related scripts
supnate May 8, 2026
89827a7
Merge pull request #53 from supnate/sdk-upgrade-dev
supnate May 8, 2026
f2c31d4
add test build
supnate May 8, 2026
58859db
Merge pull request #54 from supnate/sdk-upgrade-dev
supnate May 8, 2026
8624386
Bump axios from 1.13.2 to 1.15.2 in /ui-plugins/muse-runner-ui
dependabot[bot] May 8, 2026
dbe48b0
fix test build
supnate May 8, 2026
9e58d79
Merge pull request #55 from eBay/dependabot/npm_and_yarn/ui-plugins/m…
supnate May 8, 2026
779320d
Merge pull request #56 from supnate/sdk-upgrade-dev
supnate May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.13.0
node-version: 22.17.0

- uses: pnpm/action-setup@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.13.0
node-version: 22.17.0
registry-url: 'https://registry.npmjs.org'

- uses: pnpm/action-setup@v3
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ build
node_modules
~

vite.config.*.timestamp-*
vite.config.*.timestamp-*
.claude
9 changes: 0 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,6 @@ When working with `muse-express-middleware`, these are the key endpoints:

**File reference**: `workspace/packages/muse-express-middleware/lib/index.js`

### Plugin Development

When creating plugins, remember:

1. Plugin type is declared in `package.json` under `muse.type`
2. Entry point can be customized via `muse.entry` field
3. Build outputs must go to `dist/` (production) and `dev/` (development)
4. Shared modules in lib plugins must be declared in `muse.exposes`

### Muse Runner

Expand Down Expand Up @@ -308,7 +300,6 @@ The webpack plugin handles:
### Vite Plugin

Similar functionality for Vite-based builds:
- Module federation-like shared dependencies
- Manifest generation
- Dev server integration

Expand Down
7 changes: 6 additions & 1 deletion examples/demo-controller-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "demo-controller-plugin",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "examples/demo-controller-plugin"
},
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down Expand Up @@ -52,4 +57,4 @@
"last 1 safari version"
]
}
}
}
7 changes: 6 additions & 1 deletion examples/demo-init-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "demo-init-plugin",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "examples/demo-init-plugin"
},
"version": "1.0.0",
"description": "",
"type": "module",
Expand All @@ -25,4 +30,4 @@
"keywords": [],
"author": "",
"license": "MIT"
}
}
7 changes: 6 additions & 1 deletion examples/doc-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "doc-plugin",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "examples/doc-plugin"
},
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down Expand Up @@ -54,4 +59,4 @@
"app": "myapp"
}
}
}
}
5 changes: 5 additions & 0 deletions examples/roles-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "roles-plugin",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "examples/roles-plugin"
},
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down
5 changes: 5 additions & 0 deletions examples/users-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "users-plugin",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "examples/users-plugin"
},
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down
5 changes: 5 additions & 0 deletions muse-ci-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "@ebay/muse-ci-tools",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "muse-ci-tools"
},
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
223 changes: 223 additions & 0 deletions muse-site/docs/msp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# Muse SDK Presets (MSP)

**Muse SDK Presets (MSP)** is a registry-managed system for defining and distributing named sets of pinned package versions across a Muse deployment. Instead of every plugin team manually tracking which version of `@ebay/muse-core`, `@ebay/muse-lib-react`, etc. to use, an MSP preset provides a single authoritative snapshot that teams can reference by name.

## Purpose

In a large micro-frontend organization, dozens of plugin teams share the same core libraries. Version drift between teams causes compatibility issues at runtime — a normal plugin may consume a different React version than what the lib plugin exposes.

MSP solves this by:

- Centralizing approved package versions into named presets stored in the Muse registry (`/msp.yaml`)
- Allowing presets to **extend** a base preset so version sets compose rather than duplicate
- Providing CLI tools to keep presets up to date from the npm registry
- Providing a per-plugin command to update its own `package.json` to exactly match the preset it declared

## Storage

MSP data lives in the Muse registry as a single YAML file at `/msp.yaml`. Example:

```yaml
default:
description: Base Muse package versions
versions:
"@ebay/muse-core": "1.0.45"
"@ebay/muse-cli": "1.0.34"
"@ebay/muse-lib-react": "1.3.2"
"@ebay/muse-lib-antd": "1.3.2"

muse-react-260422:
extends: default
description: React preset
creation: "2026-04-22"
author: Nate Wang
versions:
"@ebay/muse-lib-react": "2.0.3"

muse-react-antd-260422:
extends: muse-react-260422
description: React + Ant Design preset
creation: "2026-04-22"
author: Nate Wang
versions:
"@ebay/muse-lib-antd": "2.0.3"
```

## Preset Resolution (`extends`)

When a preset declares `extends`, its versions are **merged** with the parent's versions — child values override parent values. This resolution is applied recursively through the entire chain.

For the example above, the fully resolved `muse-react-antd-260422` preset contains:

```json
{
"@ebay/muse-core": "1.0.45",
"@ebay/muse-cli": "1.0.34",
"@ebay/muse-lib-react": "2.0.3",
"@ebay/muse-lib-antd": "2.0.3"
}
```

The resolved (flattened) view is available via `museCore.data.get('muse.msp')`.

## Declaring an MSP preset in a plugin

In a plugin's `package.json`, add the `muse.msp` field with the preset name:

```json
{
"name": "@ebay/my-plugin",
"muse": {
"type": "normal",
"msp": "muse-react-antd-260422"
}
}
```

## Updating plugin dependencies from the preset

Once `muse.msp` is declared, run:

```bash
muse check-updates
# or
muse-dev-utils check-updates
```

This command:
1. Reads `muse.msp` from `package.json`
2. Fetches the fully resolved preset from the registry
3. Compares each preset package's version against the currently **installed** version
4. Runs the detected package manager (`npm` / `pnpm` / `yarn`) to install only the packages that are behind

Only packages already listed in `dependencies` or `devDependencies` are updated. New packages are never added.

## Muse CLI — MSP management commands

All MSP management commands are available via the `muse` CLI:

### `muse get-msp`

Print the full contents of `msp.yaml` as JSON.

```bash
muse get-msp
```

### `muse add-preset <name>`

Add a new preset. The new preset is inserted at the **top** of `msp.yaml`.

```bash
# Basic preset with explicit versions
muse add-preset muse-react-260422 \
--versions @ebay/muse-lib-react=2.0.3

# Preset that extends a base preset
muse add-preset muse-react-antd-260422 \
--extends muse-react-260422 \
--versions @ebay/muse-lib-antd=2.0.3
```

Options:
- `--extends <preset>` — parent preset to inherit versions from
- `--versions <pkg=version> ...` — space-separated list of package versions

### `muse delete-preset <name>`

Delete a preset from `msp.yaml`. Prompts for confirmation.

```bash
muse delete-preset muse-react-260422
```

### `muse update-preset-packages`

Update specific package versions in `msp.yaml` across all presets. A package is only updated in a preset if the new version shares the **same major version** as the current value in that preset. Pre-release versions are skipped unless `allowPreRelease` is configured via the API.

```bash
muse update-preset-packages \
--versions @ebay/muse-core=1.0.46 @ebay/muse-cli=1.0.35
```

### `muse sync-preset-latest`

Fetch the latest published version of every package in `msp.yaml` from the npm registry and apply them (same major version rule applies).

```bash
# Use default registry (https://registry.npmjs.org)
muse sync-preset-latest

# Use a custom registry
muse sync-preset-latest --registry https://my.registry.com
```

### `muse check-updates`

Update a plugin's own `package.json` dependencies to match the MSP preset declared in `muse.msp`.

```bash
muse check-updates
```

## Programmatic API (`museCore.msp`)

MSP operations are available as a first-class subsystem on `museCore`:

```js
const museCore = require('@ebay/muse-core');

// Get raw msp.yaml contents
const raw = await museCore.msp.getMsp();

// Get flattened presets (extends fully resolved)
const flattened = await museCore.data.get('muse.msp');

// Add a preset
await museCore.msp.addPreset({
name: 'muse-react-260422',
preset: {
extends: 'default',
description: 'React preset',
versions: { '@ebay/muse-lib-react': '2.0.3' },
},
author: 'nate',
});

// Delete a preset
await museCore.msp.deletePreset({ name: 'muse-react-260422' });

// Update package versions across all presets (same-major rule)
await museCore.msp.updatePackages({
pkgs: {
'@ebay/muse-core': { version: '1.0.46' },
'@ebay/muse-cli': { version: '1.0.46-beta.1', allowPreRelease: true },
},
});

// Sync all packages to their latest npm versions
await museCore.msp.syncLatest({ registry: 'https://registry.npmjs.org' });
```

## Files changed in this implementation

| File | Description |
|---|---|
| `muse-core/lib/msp/` | New `msp` subsystem folder (mirrors `am/`, `pm/` pattern) |
| `muse-core/lib/msp/getMsp.js` | Read `/msp.yaml` from the registry |
| `muse-core/lib/msp/addPreset.js` | Add a preset (inserted at top of file) |
| `muse-core/lib/msp/deletePreset.js` | Delete a preset by name |
| `muse-core/lib/msp/updatePackages.js` | Bulk update package versions with major-version guard |
| `muse-core/lib/msp/syncLatest.js` | Fetch latest npm versions and call `updatePackages` |
| `muse-core/lib/msp.js` | Thin re-export shim (`module.exports = require('./msp/index')`) |
| `muse-core/lib/schemas/msp/` | JSON schemas for each MSP API's params |
| `muse-core/lib/schemas/msp.json` | Registry-level schema for `/msp.yaml` content |
| `muse-core/lib/data/builders/muse.msp.js` | Data builder: reads & flattens `extends` chains for `muse.data.get('muse.msp')` |
| `muse-core/lib/plugins/registrySchemaPlugin.js` | Registered `msp.json` schema for registry write validation |
| `muse-core/lib/utils.js` | Added `/msp.yaml` case to `parseRegistryKey` |
| `muse-core/lib/index.js` | Exposed `museCore.msp` |
| `muse-cli/bin/muse.js` | Added `get-msp`, `add-preset`, `delete-preset`, `update-preset-packages`, `sync-preset-latest`, `check-updates` commands |
| `muse-cli/package.json` | Added `@ebay/muse-dev-utils` dependency |
| `muse-dev-utils/scripts/checkUpdates.js` | `check-updates` implementation using `cross-spawn` + `import-cwd` |
| `muse-dev-utils/bin/muse-dev-utils.js` | Wired `check-updates` command |
| `muse-dev-utils/package.json` | Added `cross-spawn`, `import-cwd` dependencies |
5 changes: 5 additions & 0 deletions muse-site/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "muse-site",
"repository": {
"type": "git",
"url": "https://github.com/ebay/Muse",
"directory": "muse-site"
},
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down
Loading
Loading