New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@agentuity/frontend

Package Overview
Dependencies
Maintainers
3
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentuity/frontend

latest
npmnpm
Version
2.0.11
Version published
Weekly downloads
3.6K
-46.15%
Maintainers
3
Weekly downloads
 
Created
Source

@agentuity/frontend

Generic web utilities for building Agentuity frontend applications. Provides framework-agnostic utilities for URL building, serialization, reconnection logic, and type definitions.

This package contains reusable JavaScript logic that can be shared across different frontend frameworks (React, Svelte, Vue, etc.).

Installation

npm install @agentuity/frontend

Features

  • URL Building: Utilities for constructing URLs with query parameters
  • Environment Helpers: Cross-platform environment variable access
  • Serialization: JSON serialization/deserialization utilities
  • Reconnection Logic: Exponential backoff reconnection manager for WebSockets and SSE
  • Type Definitions: Shared TypeScript types for route registries
  • Memoization: JSON-based equality checking
  • WebRTC: Multi-peer connections with data channels, screen sharing, and recording

Usage

URL Building

import { buildUrl, defaultBaseUrl } from '@agentuity/frontend';

const url = buildUrl(
	'https://api.example.com',
	'/users',
	undefined,
	new URLSearchParams({ page: '1' })
);
// => 'https://api.example.com/users?page=1'

Reconnection Manager

import { createReconnectManager } from '@agentuity/frontend';

const reconnect = createReconnectManager({
	onReconnect: () => console.log('Reconnecting...'),
	threshold: 3,
	baseDelay: 500,
	factor: 2,
	maxDelay: 30000,
});

// Record failures to trigger exponential backoff
reconnect.recordFailure();

Serialization

import { deserializeData } from '@agentuity/frontend';

const data = deserializeData<MyType>('{"key":"value"}');

WebRTC

Multi-peer WebRTC connections with auto-reconnection and data channels:

import { WebRTCManager } from '@agentuity/frontend';

const manager = new WebRTCManager({
	signalUrl: 'ws://localhost:3500/api/webrtc/signal',
	roomId: 'my-room',
	autoReconnect: true,
});

manager.on('peerConnected', (peerId) => console.log('Peer joined:', peerId));
manager.on('dataChannelMessage', ({ channel, data }) => console.log(channel, data));

await manager.connect();
manager.sendJSON('chat', { message: 'Hello!' });

Key features:

  • Multi-peer mesh networking
  • Auto-reconnection with exponential backoff
  • Data channels (JSON, binary, ArrayBuffer)
  • Screen sharing and recording
  • ICE/connection timeout detection
  • Connection quality stats API

For detailed architecture, see docs/webrtc-architecture.md.

License

Apache-2.0

FAQs

Package last updated on 08 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts