Registry / devops / rd-queue-system

rd-queue-system

JSON →
library0.3.6jsnpmunverified

rd-queue-system v0.3.6 is a basic Node.js queue system for managing agent login/logout, enqueuing interactions, and assigning them to available agents. It provides simple queue operations with minimal dependencies. No release cadence documented; appears infrequently updated. Differentiators: lightweight and simple compared to Bull or Bee-Queue.

npm install rd-queue-system
INSTALL
IMPORT
SIG · RD-QUEUE-SYSTEM
R
rd-queue-system
devopsjavascriptv0.3.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QueueSystem
import { QueueSystem } from 'rd-queue-system'
const QueueSystem = require('rd-queue-system')
Package is ESM-only since v0.3
Agent
import { Agent } from 'rd-queue-system'
import Agent from 'rd-queue-system'
Agent is a named export, not default
Interaction
import { Interaction } from 'rd-queue-system'
const { Interaction } = require('rd-queue-system')
ESM only; CommonJS require will fail

Creates a queue system, logs in an agent, enqueues an interaction, assigns it to an agent, and logs out the agent.

import { QueueSystem, Agent, Interaction } from 'rd-queue-system'; const queue = new QueueSystem(); const agent1 = new Agent('agent-1'); queue.loginAgent(agent1); const interaction = new Interaction('user-1', 'Help!'); queue.enqueue(interaction); const assignedAgent = queue.assignNext(); console.log('Assigned to:', assignedAgent.id); queue.logoutAgent(agent1);
Debug
Known issues
breakingESM-only: require() throws 'ERR_REQUIRE_ESM'
fix
Use import statements and set "type": "module" in package.json
affects: >=0.3
gotchaAgent IDs must be unique; duplicate IDs cause silent overwrite
fix
Ensure each Agent has a unique id before calling loginAgent
affects: >=0.1
gotchaInteraction queue is in-memory; data lost on process restart
fix
Implement a persistent backend or use a dedicated queue service for production
affects: >=0.1
deprecatedassignNext() may be deprecated in future versions in favor of assignNextAgent()
fix
Check CHANGELOG for assignNextAgent() usage
affects: >=0.3.6
Errors
Common errors & fixes
TypeError: require() of ES Module from CJS
Using CommonJS require() on an ESM-only package
fix
Use import syntax or set "type": "module" in package.json; alternatively, use dynamic import()
Cannot read properties of undefined (reading 'id')
assignNext() returns undefined when no agents are logged in or no interactions queued
fix
Check queue state before calling assignNext(): verify there are logged-in agents and queued interactions
Agent with id "<id>" is already logged in
Trying to login an agent that is already logged in
fix
Check agent login status before calling loginAgent(); use agent.loggedIn property if available
Upgrade
Version history
0.3.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rd-queue-system — npm install rd-queue-system · libregistry