Scan your whole stack
Are you using @nia-teams/agent-bridge-core?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.3.6
@nia-teams/agent-bridge-core was last scanned on 25 Nov 2026 at version 0.3.6. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.6 LATEST | 25 Nov 2026 | No rules fired |
| 0.3.5 | 22 Nov 2026 | No rules fired |
| 0.3.4 | 22 Nov 2026 | No rules fired |
| 0.3.3 | 19 Nov 2026 | Not shown |
| 0.3.2 | 18 Nov 2026 | Not shown |
Findings for v0.3.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.3.6; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
English | 简体中文
Node.js SDK for connecting any external Agent runtime into Nia Teams as an Agent in Nia Teams with two-way communication.
npm install @nia-teams/agent-bridge-core
AI guide: skills/agent-bridge-core/SKILL.md · node_modules/@nia-teams/agent-bridge-core/skills/agent-bridge-core/SKILL.md.
For terminal QR setup with WeChat and optional GroupChat invites, see WeChat connect.
Run node examples/wechat-connect.mjs from this package directory to try the WeChat SDK example. It saves credentials without starting a runtime. Call connectWithWeChat to embed the flow. Its onScan callback receives the QR payload URL and expiry; use runConnectCli for terminal output. The result reports mode: 'paired' | 'reused', the credentials, and the chat and handoff details.
BridgeClient connects over WebSocket with protocolVersion: 3. Its getContract() method returns collaboration instructions from ready.systemPrompt and tool definitions (name, description, inputSchema, deferLoading?) from ready.tools. Use resolveThreadPrompt(frame) for incoming prompts.
A TurnRunner returns void and invokes handshake-advertised collaboration tools through context.callTool (context.send and context.history remain convenience wrappers for send_message and chat_history). SessionHost does not publish return text.
pairHost saves host Ed25519 credentials; BridgeClient opens a challenge/lease-authenticated WebSocket; adapters run GroupChat turns; PublicationQueue publishes replies. Consumer runtimes own models, tools, and local permissions.
| Consumer runtime | This package | Nia Teams |
|---|---|---|
| Models, tools, workspace, and sessions | Pairing, authentication, reconnection, and publication | Chat identity, routing, and activity |
| Execute or deny tool requests | Verify signed TaskBar confirmation | Membership checks, approval cards, and signing |
Supply clientName / PNG avatar |
Report opaque branding on pairing and every lease handshake | Display pairing and GroupChat identity via lightweight avatar URLs |
Adapters carry their own product name (clientName) and PNG image (avatar).
Pass them to pairHost({ clientName, avatar, ...options }) for pairing/start
and new BridgeClient(credentials, { clientName, avatar }) for every lease
handshake/reconnect. SessionHostOptions / runSessionDaemon accept the same
optional fields. Custom Node.js Agents can supply their own branding; core and
Teams have no client registry, so adding a client requires no server changes.
clientName is trimmed to 1–80 characters without control characters. avatar
must be data:image/png;base64,..., with decoded PNG file size ≤64 KiB and
dimensions ≤1024×1024; SVG and remote image URLs are rejected. Pairing pages and
GroupChat identities automatically display the supplied icon. Upgrading and
starting an already-paired client synchronizes branding through verified leases,
without re-pairing. Omitted lease fields preserve stored branding; custom user
avatars win. APIs return lightweight image URLs, not inline image data.
See the protocol. Supply branding at both pairing and connection entry points; browser approval alone never commits host branding before successful proof of private-key possession.
Requires Node.js 20+. These ESM examples run as .mjs files with node.
import { defaultConfigDir, pairHost } from '@nia-teams/agent-bridge-core';
await pairHost({
configDir: defaultConfigDir('my-agent', 'MY_AGENT_CONFIG_DIR'),
hostLabel: 'my-agent',
onPairing: ({ verificationUrl }) => console.log(verificationUrl),
});
Open the printed URL in a browser to create or rebind an external Agent. Later connections load the saved credentials.
import { BridgeClient, defaultConfigDir, loadCredentials, resolveThreadPrompt } from '@nia-teams/agent-bridge-core';
const configDir = defaultConfigDir('my-agent', 'MY_AGENT_CONFIG_DIR');
const bridge = new BridgeClient(await loadCredentials(configDir), {
onError: error => console.error(error.message),
});
bridge.onThreadMessage(async frame => {
console.log(resolveThreadPrompt(frame));
await bridge.rpc('tool.call', {
sessionId: frame.sessionId,
toolCallId: frame.deliveryId,
name: 'send_message',
arguments: { content: 'Received' },
});
await bridge.rpc('thread.activity', {
sessionId: frame.sessionId,
state: 'idle',
deliveryId: frame.deliveryId,
});
});
bridge.onThreadCancel(() => {});
bridge.onCardAction(() => {});
bridge.onReady(frame => console.log('Connected:', frame.agent.slug));
process.once('SIGINT', () => bridge.close());
process.once('SIGTERM', () => bridge.close());
await bridge.start();
For a model-backed runtime, pass resolveThreadPrompt(frame) and bridge.getContract() to the model. Publish replies through tool.call and report turn completion through thread.activity with state: 'idle' and the processed deliveryId.
Run the packaged examples:
node node_modules/@nia-teams/agent-bridge-core/examples/pair.mjs
node node_modules/@nia-teams/agent-bridge-core/examples/connect.mjs
| Subpath | Purpose |
|---|---|
/types |
Credentials, push frames, and RPC types |
/crypto |
Ed25519 signing and deterministic thread IDs |
/credentials |
Private credential validation and atomic access |
/pairing |
pairHost, runPairingCli, acquireLease |
/bridge-client |
BridgeClient, BridgeRpcError |
/publications |
Bounded idempotent PublicationQueue |
/format |
formatThreadMessage GroupChat prompt formatting |
/http |
Origin validation and HTTP requests |
/state |
JsonFileStore, ThreadMapStore, and private state paths |
/process |
IdleSleepGuard and executable discovery |
The root entry also exports runtime services:
| Export | Purpose |
|---|---|
SessionHost |
GroupChat queues, session resume, cancellation, questions, and approval cards |
runSessionDaemon |
Assemble BridgeClient and SessionHost with signal-driven shutdown and PID tracking |
stopSessionDaemon |
Stop the daemon registered in a given config directory |
consumeSdkQuery |
Consume SDK events and synchronize sessions and activity without publishing text |
ThreadMapStore |
Persist per-GroupChat consumer runtime session IDs |
IdleSleepGuard |
Prevent system sleep with caffeinate while tasks run on macOS |
Types: dist/**/*.d.ts. Frames and signing: docs/SPECIFICATION.md.
0700/0600, and loading validates keys and paths.<mention userId="24-hex-id" />.npm install
npm run build
npm run typecheck
npm test
MIT © Nia Teams
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.