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

@trytilde/chat-proxy

v3.1.1

Published

Server-side Web Request/Response reverse proxy for the Tilde ConnectRPC chat provider.

Readme

@trytilde/chat-proxy

Server-side Web Request/Response reverse proxy for the Tilde ConnectRPC chat provider.

import { createChatProxy } from '@trytilde/chat-proxy';
const proxy = createChatProxy({
  apiKey: process.env.TILDE_CHAT_API_KEY!,
  agentId: process.env.TILDE_AGENT_ID!,
  baseUrl: 'https://api.trytilde.ai',
  resolveIdentity: async (request, agentId) => {
    const user = await yourSessionAuthentication(request);
    return user && await yourAgentAccessCheck(user, agentId) ? user.id : null;
  },
});
// Route /api/chat/* to proxy.handle(request).

Read the API key in the agent's Chat Providers → Tilde card. Keys authenticate your server application. resolveIdentity must derive a stable identity from verified server authentication, never from a browser identity field. Returning null denies that agent. Tilde scopes each identity to the agent and checks active session membership before search/pagination, history, attachment reads, subscriptions, and mutations. A newly created session contains the authenticated user and the configured agent. Existing participants can explicitly add/remove participants; an outsider cannot add themselves to a session.

baseUrl defaults to the hosted API. baseUrlOverride replaces the complete agent ingress base URL, including any /agents/{id} prefix; it is server configuration, never request input. mountPath defaults to /api/chat; adapters can instead supply catch-all path segments to handle(request, path).

For a sidebar across agents, replace apiKey/agentId with agents: [{agentId,apiKey,baseUrl?}, …]. Each entry is independently authorized by resolveIdentity. GET /api/chat/agents returns only authorized agent names/IDs. Connect calls use /api/chat/{agentId}/tilde.provider.tilde.v1.ChatService/{method}. A single-agent proxy also accepts the service path directly.

Only declared provider RPC methods are forwarded. Browser credentials and identity headers are replaced; cookies stay at the host. Cross-origin browser requests are rejected. Streaming request/response bodies and cancellation pass through without buffering, responses disable caching, and redirects are rejected so credentials cannot follow an upstream redirect. Application authentication and upstream failures do not expose keys or internal error details.

The native wire identity header x-tilde-identity is base64url-encoded UTF-8; use this package or the SDK rather than setting it in browser code. API key rotation invalidates new requests immediately. Existing subscriptions use a signed, identity-scoped internal credential with a maximum 15-minute lifetime and recheck membership before delivering events; reconnects use the current server-side key.