Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@agentuity/frontend

Package Overview
Dependencies
Maintainers
3
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentuity/frontend

npmnpm
Version
1.0.37
Version published
Weekly downloads
2K
-56.27%
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 06 Mar 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