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

@proxly/sdk

v0.1.7-beta.9

Published

SDK and CLI tools for Proxly AI App Developers

Readme

Proxly SDK (@proxly/sdk)

This SDK provides the necessary functions for web applications running within the Proxly platform to interact with the secure host environment, user data, and AI models.

Installation

# Using pnpm (recommended in this workspace)
pnpm add @proxly/sdk

# Using npm
npm install @proxly/sdk

# Using yarn
yarn add @proxly/sdk

Core API Functions

The SDK exposes the following asynchronous functions:

getAppInfo(): Promise<AppInfo>

  • Purpose: Fetches metadata about the currently running application itself.
  • Returns: A promise resolving to an AppInfo object containing:
    • app_id: string: The unique identifier of the application.
    • name: string: The application's display name.
    • version: string: The application's version.
    • permissions?: Permission[]: (Optional) The list of permissions declared in the app's manifest.
  • Permissions Required: None (implicitly granted).

requestPermission(permission: Permission): Promise<PermissionResult>

  • Purpose: Requests user consent to grant a specific permission to the application.
  • Parameters:
    • permission: Permission: A string representing the permission needed. This follows specific formats:
      • General: "ReadUserMemory", "WriteUserMemory", "NetworkAccess"
      • Key-specific Memory: `ReadUserMemory:${key}`, `WriteUserMemory:${key}` (e.g., "ReadUserMemory:user-settings")
      • Wildcard Memory: "ReadUserMemory:*", "WriteUserMemory:*"
      • Model-specific Execution: `RunModel:${modelId}` (e.g., "RunModel:llama3-instruct")
      • Wildcard Model Execution: "RunModel:*"
  • Returns: A promise resolving to a PermissionResult object:
    • granted: boolean: Whether the user granted the permission.
    • error?: string: An error message if the request failed or was denied.
  • Permissions Required: RequestPermission (implicitly granted to allow requesting others).

getUserMemory(key: string): Promise<MemoryReadResult>

  • Purpose: Reads a value associated with a specific key from the user's secure shared memory store.
  • Parameters:
    • key: string: The key identifying the data to retrieve.
  • Returns: A promise resolving to a MemoryReadResult object:
    • success: boolean: Indicates if the read was successful.
    • value?: any: The retrieved value (if successful and exists).
    • error?: string: An error message if the read failed (e.g., permission denied, key not found).
  • Permissions Required: ReadUserMemory (either wildcard * or specific permission matching the key).

setUserMemory(key: string, value: any): Promise<MemoryWriteResult>

  • Purpose: Writes or updates a value associated with a specific key in the user's secure shared memory store.
  • Parameters:
    • key: string: The key identifying the data location.
    • value: any: The data to store (must be JSON-serializable).
  • Returns: A promise resolving to a MemoryWriteResult object:
    • success: boolean: Indicates if the write was successful.
    • error?: string: An error message if the write failed (e.g., permission denied, serialization error).
  • Permissions Required: WriteUserMemory (either wildcard * or specific permission matching the key).

runModel(modelId: string, input: any): Promise<ModelResult>

  • Purpose: Executes a specified AI model available within the Proxly platform, providing it with input data.
  • Parameters:
    • modelId: string: The identifier for the AI model to use (e.g., "local-summarizer", "phi3-mini-cloud").
    • input: any: The input data for the model (must be JSON-serializable).
  • Returns: A promise resolving to a ModelResult object:
    • success: boolean: Indicates if the model execution was successful.
    • output?: any: The output generated by the model.
    • error?: string: An error message if execution failed (e.g., permission denied, model unavailable, runtime error).
  • Permissions Required: RunModel (either wildcard * or specific permission matching the modelId).

Types

The SDK also exports the necessary TypeScript interfaces (AppInfo, PermissionResult, MemoryReadResult, MemoryWriteResult, ModelResult, Permission). Refer to the source code (./src/types.ts) for detailed definitions.

Usage Example (React)

import React, { useState, useEffect } from 'react';
import {
  getAppInfo,
  requestPermission,
  getUserMemory,
  setUserMemory,
  runModel,
  AppInfo,
  PermissionResult,
  // ... other types
} from '@proxly/sdk';

function MyProxlyApp() {
  const [info, setInfo] = useState<AppInfo | null>(null);
  const [memoryData, setMemoryData] = useState<any>(null);

  useEffect(() => {
    // Get app info on mount
    getAppInfo().then(setInfo).catch(console.error);
  }, []);

  const handleSaveSettings = async (settings: any) => {
    try {
      const permResult = await requestPermission('WriteUserMemory:app-settings');
      if (permResult.granted) {
        const writeResult = await setUserMemory('app-settings', settings);
        if (writeResult.success) {
          console.log('Settings saved successfully!');
        } else {
          console.error('Failed to save settings:', writeResult.error);
        }
      } else {
         console.warn('Permission denied to save settings.');
      }
    } catch (error) {
      console.error('Error saving settings:', error);
    }
  };

  // ... other component logic ...

  return (
    <div>
      <h1>Welcome to {info?.name || 'Proxly App'}</h1>
      {/* ... UI elements ... */}
    </div>
  );
}