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

acl-layer-ts

v1.8.5

Published

TypeScript SDK for Adaptive Context Layer (ACL) - Modular LLM Orchestration & Context Management

Readme

ACL TypeScript SDK (acl-layer-ts)

Official TypeScript SDK for Adaptive Context Layer (ACL).

Installation

npm install acl-layer-ts

AI Agent Install And Infra Setup

Use this flow when agents/dev tools install and run ACL in production:

  1. Install SDK
npm install acl-layer-ts@latest
  1. Set environment variables (domain only, never raw server IP)
# Public ACL endpoint behind your domain/reverse proxy
export ACL_BASE_URL="https://backend.yourcompany.com"

# Org-scoped ACL key from ACL dashboard
export ACL_API_KEY="acl_live_xxx"

# Provider key stays only with your app/agent runtime
export OPENAI_API_KEY="sk-xxx"
  1. Initialize client using env vars
import { ACLClient } from 'acl-layer-ts';

const client = new ACLClient({
  apiKey: process.env.ACL_API_KEY!,
  baseUrl: process.env.ACL_BASE_URL!,
});

Security notes:

  • Do not hardcode keys in source code.
  • Do not expose EC2/public IP in SDK config; always use DNS/domain.
  • Rotate keys immediately if logs/screenshots accidentally leak them.
  • Keep backend behind TLS (https) and firewall to trusted ports only.

Quick Start

import { ACLClient } from 'acl-layer-ts';

const client = new ACLClient({ apiKey: 'acl_live_...' });

const result = await client.complete({
  prompt: 'Summarize this incident report.',
  model: 'gpt-4o',
  llm_api_key: 'sk-...',
  max_retries: 3,
});

if (result.success) {
  console.log(result.response);
} else {
  console.error(`${result.error_code}: ${result.error_message}`);
}

Latency Controls (v1.8.5)

new ACLClient(...) supports these runtime options:

  • emitPostCompletionTelemetry (default: true): post-completion telemetry is non-blocking.
  • precheckCacheTtlMs (default: 20000): short TTL cache for adaptive precheck calls.
  • precheckCacheMaxEntries (default: 256): max in-memory precheck cache entries.

Every complete() response now includes timing metadata under metadata.acl_timing:

  • precheck_ms
  • provider_ms
  • post_telemetry_ms
  • wall_clock_ms

Runtime Contract

complete() always returns a stable top-level response shape on both success and failure:

  • success
  • error_code
  • error_message
  • provider
  • model
  • text and response

Validation and Safety

  • Fail-fast validation for invalid/missing prompt, unresolved model, missing keys, and malformed provider key formats.
  • Strict provider payload allowlist prevents internal ACL params from leaking to provider APIs.
  • Secrets are redacted from surfaced error messages by default.
  • Production default ACL base URL is http://backend.fridayaicore.in.

Retry Behavior

  • Retries happen in SDK provider execution middleware (complete() path).
  • Exponential backoff with jitter and cap:
  • attempt 1: random delay 0-0.5s
  • attempt 2: random delay 0-1s
  • attempt 3: random delay 0-2s
  • max cap per attempt: 8s

Compatibility Policy

  • Node.js: >=16
  • Module output: CommonJS (dist/index.js)
  • Types: bundled .d.ts in dist/
  • Release policy: include migration notes whenever response contract or validation behavior changes.

Usage Terms

  • This SDK is proprietary and licensed for ACL service access only.
  • A valid ACL API key is required.
  • Redistribution, resale, sublicensing, and derivative redistribution are not permitted without written approval from ACL Team.

License

UNLICENSED / Proprietary. See LICENSE.