npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

roboparty-rpnpm-client

v0.1.1

Published

Typed RoboParty web integration SDK for log services and robot identity.

Readme

RoboParty Web Integration SDK 0.1.1

Repository: https://github.com/Roboparty/roboparty_rpnpm_cilent Package: roboparty-rpnpm-client (correctly spelled client; repository name retained) License: GPL-3.0-only, following the repository LICENSE. ES modules and TypeScript declarations. Node.js >=20; modern browsers with fetch, ReadableStream, AbortController and Web Crypto in a secure context. No runtime dependencies. Published on npm as roboparty-rpnpm-client.

Build and use

npm install [email protected]

For source development: npm ci npm test npm pack --pack-destination test/tmp

Install a local tarball with npm install .

Browser entry (your backend must expose an authenticated proxy):

import { RoboPartyClient } from 'roboparty-rpnpm-client'; const sdk = new RoboPartyClient({ baseUrl: new URL('/api/robot-logs/', window.location.origin).href, token: () => getScopedUserToken(), }); const page = await sdk.queryLogs({ service: 'rp_server', limit: 20 }); const next = await sdk.queryLogs({ after: page.next_after, limit: 20 });

The proxy preserves /health, /v1/logs, /v1/segments and archive routes under its prefix. It must authenticate the user and enforce allowed records and downloads, not merely forward a service token. Cookies use same-origin credentials. SDK headers do not replace backend authorization. The current Python log server has no browser CORS or per-report authorization contract; never put its read/write tokens in a browser. Direct log access is for a trusted backend.

for await (const line of sdk.exportLogsJsonl({ device_id: 'robot-1' })) { // Write JSONL incrementally to your application export destination. } const page = await sdk.listSegments({ limit: 10 }); const item = page.segments[0]; if (item) { const bytes = await sdk.downloadSegment(item.id, item.sha256); // bytes are gzip archive data; the SDK does not extract untrusted archives. }

JSONL export is bounded by maxPages (default 100). Hitting the bound throws; already emitted lines are a partial export. Use a fixed until timestamp to bound live queries; this is not a server-side transactional snapshot. Queries retain snake_case fields from the real log-server API. Limits are 1..1000 and cursors must be safe nonnegative JavaScript integers.

Server-only robot adapter:

import { RobotClient } from 'roboparty-rpnpm-client/server'; const robot = new RobotClient({ baseUrl: configuredRobotUrl }); const identity = await robot.identity(); const health = await robot.health();

The adapter only calls GET /identity and /health. Configure trusted addresses on the backend, never accept arbitrary URLs from end users. It does not discover robots, pair, acquire leases, start motion or run maintenance tasks. Serial is the board identity, not a proof of ownership or a whole-machine SN. health.version is rpserver's version, not a full installed-package inventory. Cloud-only hosts still need a reachable management channel; installing the SDK does not create it. TLS uses the platform trust store; the package never disables certificate checks. HTTP is accepted on loopback for development, or via explicit allowInsecureHttp.

Mock entry and capabilities

import { createMockClient } from 'roboparty-rpnpm-client/mock'; const sdk = createMockClient(); console.log(sdk.mode); // 'mock', never silently used as a network fallback

Run npm run build && node examples/mock.mjs. Custom fixtures can supply logs, segments and archives. No network or robot operations are performed. Mock records are schema-v1 examples, not anonymous production submissions.

Implemented: logQuery, logExport, segmentDownload. robotIdentity is available through the server-only adapter. Not implemented: remoteCollection, cloudOta, aiReports, reportAuthorization, customerAccounts. capability(name) returns availability and a reason; requireCapability(name) throws UNSUPPORTED_CAPABILITY when unavailable. These describe SDK coverage, not live backend health or the current user's permission. No speculative cloud endpoints or fabricated task-success responses are shipped. Website accounts, SN ownership, tutorials, UI, database and deployment remain the website project's responsibility. Existing MCP packages are separate products.

Failures and configuration

RoboPartyError has code, message and optional HTTP status. Codes: INVALID_ARGUMENT, HTTP_ERROR, NETWORK_ERROR, TIMEOUT, ABORTED, INVALID_RESPONSE, RESPONSE_TOO_LARGE, INTEGRITY_ERROR, UNSUPPORTED_CAPABILITY. Raw upstream errors and credentials are not attached to exceptions. No requests are retried automatically. timeoutMs defaults to 10000 and covers token resolution through body reads. maxResponseBytes defaults to 64 MiB per response. Each method accepts { signal }. Redirects are rejected. fetch may be injected for tests or a trusted adapter. Tokens are resolved for every request and never stored by the SDK.

Validation

npm test: deterministic transport, contract, mock, pagination, errors, timeout, cancellation and integrity tests. Integration with the actual Python log server can be run via test/integration.test.mjs with RP_LOG_SERVER_SOURCE set to its source-file path. This uses a loopback process and test/tmp, not a deployed robot. No real robot, public deployment, OTA, AI or browser end-to-end acceptance is claimed by passing these tests.

Next delivery

Provide the authenticated website proxy, then validate actual scoped user access. Add remote collection, OTA and AI/report adapters only when the corresponding backend contracts and authorization exist. Freeze version compatibility before adding new public entry points.