惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
WordPress大学
WordPress大学
Recent Announcements
Recent Announcements
G
Google Developers Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Check Point Blog
J
Java Code Geeks
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
量子位
A
About on SuperTechFans
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Show HN

GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap
GitHub - shaurcasm/nirnam: Lightweight message bus for mi...
shauryaSP · 2026-06-27 · via Show HN

A three-layer hybrid message bus for micro-frontend communication and browser-native AI agents.

npm package → **Github repo →


What it does

Nirnam gives every script on a page — Module Federation remotes, iframes, Web Workers, plain <script> tags — a shared message bus without a backend. It handles pub/sub, request-reply, streaming, agent registration, and MCP transport, all routed through a SharedWorker.

Three layers, one API:

Layer Mechanism Scope
1 BroadcastChannel Cross-tab fan-out (fire-and-forget pub/sub)
2 Blob-URL SharedWorker Within-page registry, routing, request-reply, streaming
3 Static-URL SharedWorker True cross-tab routing via build plugins (opt-in)

You always call createBus() — Nirnam picks the right layer automatically.


Install

npm install @palinc/nirnam

Full usage guide and API reference →


Thirty-second example

import { createBus } from '@palinc/nirnam';

const bus = createBus();

// One MFE handles cart requests
bus.handle('cart:total', async ({ items }) => {
  return { total: items.reduce((s, i) => s + i.price, 0) };
});

// Another MFE calls it
const { total } = await bus.request('cart:total', { items: [{ price: 9.99 }] });

What's in this repo

Library/         @palinc/nirnam source + tests
Examples/
  transport/               pub/sub · request-reply · streaming basics (Vite)
  transport-with-persistence/  message replay via IndexedDB (Rsbuild)
  react-mfe/               two React MFEs sharing state (Module Federation)
  agents/                  chat · filesystem · pipeline agents (Rsbuild)
  cross-tab-agent/         host tab runs LLM; other tabs proxy via bus (Vite)
  mcp-agent/               Document Q&A with MCP servers + Ollama (Rsbuild + MF)
  static-worker/           raw SharedWorker without MFEs (Vite)
  angular-react/           Angular host + React remote (planned)

Running the examples

Each example is self-contained. Pick one:

cd Examples/transport
npm install
npm run dev

The mcp-agent example needs all three apps running:

cd Examples/mcp-agent/ollama-agent && npm install && npm run dev  # :3001
cd Examples/mcp-agent/scribe-agent && npm install && npm run dev  # :3002
cd Examples/mcp-agent/host          && npm install && npm run dev  # :3000

Developing the library

cd Library
npm install
npm run build        # one-off build
npm run build:watch  # watch mode
npm test             # jest test suite
npm run test:coverage

The library is built with Rollup into 12 entry points (ESM + CJS + .d.ts per subpath export). Source is in Library/src/.


Examples overview

transport/

The simplest starting point. A single-page vanilla JS app demonstrating all three message patterns: pub/sub, request-reply, and streaming. No framework, no bundler magic.

transport-with-persistence/

Extends the transport example with IndexedDB persistence. Late-joining subscribers can replay the last N messages on subscribe.

react-mfe/

Two independently-deployed React apps (host + remote) that share state through the bus using Module Federation. Shows useNirnam and useNirnamPublish.

agents/

Three agents in one app — a chat agent, a filesystem agent with File System Access API tools, and a pipeline of two agents where one feeds into the other. Uses the Rsbuild build plugin for Layer 3.

cross-tab-agent/

One "host" tab registers a scope: 'page' agent that owns the LLM + tools. Any other tab creates an AgentProxy and gets the same chat interface routed over the static SharedWorker. Open two tabs and chat from either.

mcp-agent/

Three Module Federation apps. Two remotes (ollama-agent, scribe-agent) expose React components that also spin up MCP servers over NirnamMCPTransport. The host connects MCP clients to both and orchestrates a document Q&A workflow.

static-worker/

Raw SharedWorker setup without any MFE framework — useful if you want to understand Layer 3 in isolation.