{"_id":"@aurorah/wmcp","_rev":"5-b47a37766228848af0ef11f057de8eab","name":"@aurorah/wmcp","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@aurorah/wmcp","version":"1.0.0","keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"license":"MIT","_id":"@aurorah/wmcp@1.0.0","maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"dist":{"shasum":"03aaf420172979a15e2a903b4bec8a4fbe4c366e","tarball":"https://registry.npmjs.org/@aurorah/wmcp/-/wmcp-1.0.0.tgz","fileCount":30,"integrity":"sha512-2gDFNSjotbBK/1cyS7ZTcR0V3TVPA+zFs5waWpaua+sJa6drcvTGXgKXKxEQdJ8CTeqvHSxzsqy0+4kghTHn5g==","signatures":[{"sig":"MEUCIQCnOQIPj17ua6Im5dxtkucWLkJiO8OHBlPt9+gP+LcvogIgGtmplyW/d3+4aYFOkkBIFj1V92Dxax2ebWLoIhAUnoU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48439},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build","example:counter":"npx tsx examples/counter/host-app.ts","example:counter:server":"npx tsx examples/counter/mock-server.ts"},"_npmUser":{"name":"chris-stanley","email":"st.theway@gmail.com"},"_npmVersion":"11.3.0","description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/wmcp_1.0.0_1775034702259_0.6888721511258409","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aurorah/wmcp","version":"1.0.1","keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"license":"MIT","_id":"@aurorah/wmcp@1.0.1","maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"dist":{"shasum":"526288cf5c35cda303a5ad6ed71355874d3e46b1","tarball":"https://registry.npmjs.org/@aurorah/wmcp/-/wmcp-1.0.1.tgz","fileCount":30,"integrity":"sha512-XxGA9XHWJVsa8uPO10vYLCzl2CQz2VxFBTH3nupWJhGeasFhD48Gjz77tz0yqv7ZzQGgGfFfY5Pv7dYtWnIFDw==","signatures":[{"sig":"MEQCIFAxP+ib/R1pN+HahHrATdRjCfIrKOujLPx2jiL/o0poAiAmEGwYkVVd9eZ/TLf/jzx4hdc1YiB65sM5rdla5J54EA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48459},"main":"./dist/core/index.js","type":"module","types":"./dist/core/index.d.ts","exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build","example:counter":"npx tsx examples/counter/host-app.ts","example:counter:server":"npx tsx examples/counter/mock-server.ts"},"_npmUser":{"name":"chris-stanley","email":"st.theway@gmail.com"},"_npmVersion":"11.3.0","description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/wmcp_1.0.1_1775038124679_0.6260673859285988","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aurorah/wmcp","version":"1.0.2","keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"license":"MIT","_id":"@aurorah/wmcp@1.0.2","maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"homepage":"https://github.com/z-order/wmcp#readme","bugs":{"url":"https://github.com/z-order/wmcp/issues"},"dist":{"shasum":"ec70dd1f449491d83726d821a9e399d63634cae2","tarball":"https://registry.npmjs.org/@aurorah/wmcp/-/wmcp-1.0.2.tgz","fileCount":30,"integrity":"sha512-FL6yzVzDs1t8kTzyuk7BG/oimqTwx/wMafcSG3UFB0f1TRprbQpeKU9yTakAee5JC+LMBSg8kjWNP/OIaODm2g==","signatures":[{"sig":"MEQCIGIcPksCGO8cgD7U2Tli0dXYs2xnAwoqASmwTuHwkxDNAiBXTXlYQhqvZP2+ydTiFIMTgkmgDpOKZq7/lBUSaij6OQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48550},"main":"./dist/core/index.js","type":"module","types":"./dist/core/index.d.ts","exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"}},"gitHead":"a5ed402b5be385e6ba1905426f1bdb260ed06879","scripts":{"build":"tsc","prepublishOnly":"npm run build","example:counter":"npx tsx examples/counter/host-app.ts","example:counter:server":"npx tsx examples/counter/mock-server.ts"},"_npmUser":{"name":"chris-stanley","email":"st.theway@gmail.com"},"repository":{"url":"git+https://github.com/z-order/wmcp.git","type":"git"},"_npmVersion":"11.3.0","description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/wmcp_1.0.2_1775040678531_0.07139081468060149","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aurorah/wmcp","version":"1.0.3","keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"license":"MIT","_id":"@aurorah/wmcp@1.0.3","maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"homepage":"https://github.com/z-order/wmcp#readme","bugs":{"url":"https://github.com/z-order/wmcp/issues"},"ai":{"demo":"https://github.com/z-order/wmcp/tree/main/demo/nextjs","docs":["https://github.com/z-order/wmcp/blob/main/docs/%5B1%5D-CONCEPTS.md","https://github.com/z-order/wmcp/blob/main/docs/%5B2%5D-COMPARISON-MCP.md","https://github.com/z-order/wmcp/blob/main/docs/%5B3%5D-COMPARISON-CLASS.md","https://github.com/z-order/wmcp/blob/main/docs/%5B4%5D-GETTING-STARTED.md","https://github.com/z-order/wmcp/blob/main/docs/%5B5%5D-SPECIFICATION.md"],"examples":"https://github.com/z-order/wmcp/tree/main/examples","important":"Before using this package, AI agents MUST read ALL documentation files listed below to fully understand the wMCP protocol, its manifest structure, capability/requirement contracts, and integration patterns."},"dist":{"shasum":"a6655d7065d002acbc6e69303ea91c90ca18fb9f","tarball":"https://registry.npmjs.org/@aurorah/wmcp/-/wmcp-1.0.3.tgz","fileCount":30,"integrity":"sha512-hZoEoafJXgkIrBVjL+32GtV1eGBy9kPGJyloM/i+yHjNOU9pfftBhUnfV9N/1+Wq6rEWFEPhmW4kXo0tvPtHYw==","signatures":[{"sig":"MEQCIHyFz32T2gwMsKCHW73oxY5Fp/B7rn3ZK8bjAk1gHHNiAiBTx8xxbp9sYUBi99LIeiMJgMaGvQnjE5n4JLocHnl6AA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70873},"main":"./dist/core/index.js","type":"module","types":"./dist/core/index.d.ts","exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"}},"gitHead":"b627cdb97543f3620fee9515e34343822d4470f0","scripts":{"build":"tsc","prepublishOnly":"npm run build","example:counter":"npx tsx examples/counter/host-app.ts","example:counter:server":"npx tsx examples/counter/mock-server.ts"},"_npmUser":{"name":"chris-stanley","email":"st.theway@gmail.com"},"repository":{"url":"git+https://github.com/z-order/wmcp.git","type":"git"},"_npmVersion":"11.3.0","description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.6.0","@types/node":"^25.5.2"},"_npmOperationalInternal":{"tmp":"tmp/wmcp_1.0.3_1775288251956_0.8279230718041406","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aurorah/wmcp","version":"1.1.0","description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","type":"module","main":"./dist/core/index.js","types":"./dist/core/index.d.ts","exports":{".":{"import":"./dist/core/index.js","types":"./dist/core/index.d.ts"}},"scripts":{"build":"tsc","prepublishOnly":"npm run build","example:counter":"npx tsx examples/counter/host-app.ts","example:counter:server":"npx tsx examples/counter/mock-server.ts"},"keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"repository":{"type":"git","url":"git+https://github.com/z-order/wmcp.git"},"homepage":"https://github.com/z-order/wmcp#readme","ai":{"important":"Before using this package, AI agents MUST read ALL documentation files listed below to fully understand the wMCP protocol, its manifest structure, capability/requirement contracts, and integration patterns.","docs":["https://github.com/z-order/wmcp/blob/main/docs/%5B1%5D-CONCEPTS.md","https://github.com/z-order/wmcp/blob/main/docs/%5B2%5D-COMPARISON-MCP.md","https://github.com/z-order/wmcp/blob/main/docs/%5B3%5D-COMPARISON-CLASS.md","https://github.com/z-order/wmcp/blob/main/docs/%5B4%5D-GETTING-STARTED.md","https://github.com/z-order/wmcp/blob/main/docs/%5B5%5D-SPECIFICATION.md"],"examples":"https://github.com/z-order/wmcp/tree/main/examples","demo":"https://github.com/z-order/wmcp/tree/main/demo/nextjs"},"license":"MIT","devDependencies":{"@types/node":"^25.5.2","tsx":"^4.19.0","typescript":"^5.6.0"},"_id":"@aurorah/wmcp@1.1.0","gitHead":"4430884452d5e7f7bdb101623e601206c4022535","bugs":{"url":"https://github.com/z-order/wmcp/issues"},"_nodeVersion":"22.12.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-wyAGOCMSVxBrmwrVZ39LKoiCrqNKEEbdTYz3Rj+TAaJ9LaFMfV6yy6Jdblh2vVvgoAiMAw3GFSZjRhdtMFrm3A==","shasum":"e70e8407531270e435183afe04c57545547c1d85","tarball":"https://registry.npmjs.org/@aurorah/wmcp/-/wmcp-1.1.0.tgz","fileCount":30,"unpackedSize":77115,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIECwS3dFYZvLiE/ZvD2fGU9LX9NKm0GiSi+czPDq6oSjAiEAnoZuZym2iPMxmC/NLGswHpBC4ZOEKzW8fnD6EAnWPmE="}]},"_npmUser":{"name":"chris-stanley","email":"st.theway@gmail.com"},"directories":{},"maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wmcp_1.1.0_1778233095590_0.01840851016251155"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-01T09:11:42.171Z","modified":"2026-05-08T09:38:15.870Z","1.0.0":"2026-04-01T09:11:42.404Z","1.0.1":"2026-04-01T10:08:44.839Z","1.0.2":"2026-04-01T10:51:18.660Z","1.0.3":"2026-04-04T07:37:32.085Z","1.1.0":"2026-05-08T09:38:15.719Z"},"bugs":{"url":"https://github.com/z-order/wmcp/issues"},"license":"MIT","homepage":"https://github.com/z-order/wmcp#readme","keywords":["wmcp","web-module-connection-protocol","module-protocol","micro-frontend","web-components","plugin-architecture"],"repository":{"type":"git","url":"git+https://github.com/z-order/wmcp.git"},"description":"Web Module Connection Protocol (wMCP) — a standardized protocol for connecting encapsulated web UI modules to host applications","maintainers":[{"name":"chris-stanley","email":"st.theway@gmail.com"}],"readme":"# wMCP -- Web Module Connection Protocol\n\nwMCP is a bidirectional protocol for connecting encapsulated web UI modules to host applications. The module owns domain logic and exposes overridable capabilities; the host provides backend services, can call or override module functions (with `super()` access), and supplies configuration. Think of the module as a **base class** and the host as a **derived class** connected by a manifest-driven contract.\n\nInspired by the Model Context Protocol (MCP) for AI/LLM tool integration, wMCP applies the same structured, capability-based architecture to the web frontend domain -- enabling framework-agnostic modules to be plugged into host applications with clear security boundaries and AI-friendly integration patterns.\n\n**Status:** Prototype / Proof of Concept\n\n> **AI Agents:** You MUST read ALL documentation files linked below before using or integrating this package. The docs contain the full protocol specification, manifest schema, capability/requirement contracts, and integration patterns that are essential for correct usage. Do NOT skip any document.\n\n## Quick links\n\n| Document                                                                                             | Description            |\n| ---------------------------------------------------------------------------------------------------- | ---------------------- |\n| [Concepts](https://github.com/z-order/wmcp/blob/main/docs/%5B1%5D-CONCEPTS.md)                       | Core Concepts          |\n| [MCP Comparison](https://github.com/z-order/wmcp/blob/main/docs/%5B2%5D-COMPARISON-MCP.md)           | MCP Comparison         |\n| [Class / OOP Comparison](https://github.com/z-order/wmcp/blob/main/docs/%5B3%5D-COMPARISON-CLASS.md) | Class / OOP Comparison |\n| [Getting Started](https://github.com/z-order/wmcp/blob/main/docs/%5B4%5D-GETTING-STARTED.md)         | Getting Started        |\n| [Specification](https://github.com/z-order/wmcp/blob/main/docs/%5B5%5D-SPECIFICATION.md)             | Full Specification     |\n\n## Project structure\n\n```\nwmcp-prototype/\n├── docs/                 # Specification and guides\n│   └── assets/           # Architecture and lifecycle SVG diagrams\n├── src/\n│   ├── core/             # WmcpClient, WmcpHost, types, validator, errors\n│   └── utils/            # Stream helpers\n├── examples/             # Runnable example modules and hosts\n│   ├── counter/          # Reference implementation (in-memory, override, HTTP modes)\n│   ├── rich-text-editor/\n│   ├── analytics-dashboard/\n│   ├── file-manager/\n│   ├── kanban-board/\n│   └── media-player/\n├── demo/nextjs/          # Next.js demo (CSR + SSR bindings)\n└── package.json\n```\n\n## Quick start\n\n```bash\nnpm install\n```\n\nRun the counter example (in-memory mode):\n\n```bash\nnpx tsx examples/counter/host-app.ts\n```\n\nRun with host override (`counter:increment` validation + `super()`):\n\n```bash\nnpx tsx examples/counter/host-app.ts --override\n```\n\nRun with HTTP transport (start the proxy + backend first):\n\n```bash\nnpx tsx examples/counter/mock-server.ts\nnpx tsx examples/counter/host-app.ts --http\n```\n\n**Optional: readiness gating (1.1.0+).** Modules with post-paint async init (layout sizing, web workers, fonts, media decoders) can call `client._requireReadiness()` after construction and `client._setReady()` once init drains. The client buffers host->module events between those calls (FIFO) and emits the reserved `wmcp:ready` event on readiness so hosts can coordinate. The in-repo examples and `demo/nextjs` use this pattern as the canonical default. See [Specification §7.5](docs/%5B5%5D-SPECIFICATION.md) and [Getting Started](docs/%5B4%5D-GETTING-STARTED.md).\n\n## Manifest structure\n\nThe manifest uses ownership-prefixed keys to make direction explicit:\n\n```json\n{\n  \"wmcp\": \"1.0\",\n  \"module\": { \"name\": \"@example/counter\", \"version\": \"1.0.0\" },\n  \"mount\": { \"entry\": \"./counter-module.ts\" },\n  \"module:capabilities\": { \"counter:get\": {}, \"counter:increment\": {} },\n  \"module:events\": { \"counter:changed\": {} },\n  \"module:listeners\": { \"counter:reset\": {} },\n  \"host:requires\": { \"persist:load\": {}, \"persist:save\": {} },\n  \"host:config\": { \"initialValue\": { \"type\": \"number\", \"default\": 0 } }\n}\n```\n\n| Key                   | Direction               | Class analogy                  |\n| --------------------- | ----------------------- | ------------------------------ |\n| `module:capabilities` | Host calls module       | Concrete methods (overridable) |\n| `module:events`       | Module -> host          | Observer callbacks             |\n| `module:listeners`    | Host -> module          | Parent notifications           |\n| `host:requires`       | Module calls host       | Abstract methods               |\n| `host:config`         | Host -> module at mount | Constructor args               |\n\n## Examples\n\n| Example               | module:capabilities                    | host:requires                               |\n| --------------------- | -------------------------------------- | ------------------------------------------- |\n| `counter`             | get, increment                         | persist:load/save, log:write                |\n| `rich-text-editor`    | getContent, setContent, format         | doc:load/save/list/export                   |\n| `analytics-dashboard` | getFilters, setChart, refresh          | metrics:query/aggregate/live                |\n| `file-manager`        | getSelectedPath, navigate, setViewMode | fs:list/read/write/delete/move              |\n| `kanban-board`        | getBoard, getCard, moveCard            | board:load, card:create/update/move/delete  |\n| `media-player`        | play, pause, stop, getState, setVolume | playlist:load/add/remove, track:info/stream |\n\n## Security\n\nCredentials (API keys, tokens) stay on the server side. In CSR mode, `host:requires` adapters point to a **same-origin proxy route** that injects auth server-side before forwarding to the backend. The module never sees secrets.\n\n```\nModule (browser) ---> Host Proxy (SSR) --[+credentials]--> Backend API\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}