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

@infolang/sdk

v0.2.1

Published

Official TypeScript SDK for InfoLang semantic memory (il-runtime).

Downloads

251

Readme

InfoLang TypeScript SDK

Official TypeScript client for InfoLang semantic memory. Wraps the il-runtime REST API with one-line construction, typed errors, and automatic retries. fetch-native, zero runtime dependencies — targets Node 18+ and Cloudflare Workers (with the nodejs_compat compatibility flag; see docs/EDGE_COMPAT.md for the verified state and known gaps). Bun, Deno, and browser bundling are untested. Package: @infolang/sdk (npm).

Install

npm install @infolang/sdk

Quickstart

import { InfoLang } from "@infolang/sdk";

const il = InfoLang.fromApiKey("il_live_...");          // managed cloud
const result = await il.investigate("How does auth middleware work?");
for (const chunk of result.chunks) console.log(chunk.score, chunk.text);

Three ways to call, depending on your runtime:

// 1. One-shot
const { chunks } = await InfoLang.fromApiKey("il_live_...").investigate("query");

// 2. OAuth via ~/.config/infolang/session.json
const il = InfoLang.fromSessionFile();
await il.memorize("a fact worth keeping", { source: "docs/auth.md" });

// 3. Self-hosted dev runtime
const local = InfoLang.fromDevKey("devsecret:default");
const recent = await local.listRecent({ n: 10 });

Authentication

| Mode | Constructor | Target | |------|-------------|--------| | Managed cloud (API key) | InfoLang.fromApiKey("il_live_...") | api.infolang.ai | | Managed cloud (OAuth) | InfoLang.fromSessionFile() | api.infolang.ai | | Self-hosted dev | InfoLang.fromDevKey("key:namespace") | 127.0.0.1:8766 |

Credentials are also read from the environment: INFOLANG_API_KEY, INFOLANG_DEV_KEY, INFOLANG_BASE_URL, INFOLANG_NAMESPACE.

Enterprise mTLS is not yet first-class in the TypeScript SDK because the Fetch standard does not expose client-certificate configuration. Pass a custom fetch (backed by a Node https.Agent with cert/key) via the fetch option to use mTLS today; the Python SDK supports InfoLang.from_mtls(...) directly.

Core API

| Method | Purpose | |--------|---------| | recall(query, { namespace, topK, filters, verbose }) | Semantic recall | | recallHybrid(query, { namespace, topK, tagFilter, candidatePool }) | Recall over a candidate pool with tag-inclusion ordering | | investigate(query, { namespaceHint, topK = 5 }) | Agent-style recall | | remember(text, { source, tags, namespace }) | Store a memory | | rememberBatch(items, { namespace, source }) | Store many memories in one call | | memorize(content, { source, tags, namespace }) | Alias of remember | | forget(memoryId, { namespace }) | Delete a memory | | resetNamespace(namespace) | Bulk clear a namespace (list + forget) | | listBanks() / listRecent({ namespace, n }) | Introspection | | contextPack(query, { namespace, maxTokens, repoRoot }) | One-shot context string | | ingestRepo(namespace, { repoRoot, ref }) | Index a repository | | execute(operations) | Batch ops | | health.check() | Liveness/readiness |

Errors

All failures throw a subclass of InfoLangError: AuthenticationError, RateLimitError (with retryAfter), NotFoundError, ValidationError, ServerError, plus InfoLangConnectionError for transport failures. Every API error carries status, body, and requestId.

Resilience

recall/remember and friends retry 429 and 5xx with exponential backoff plus full jitter (configurable via maxRetries), honor Retry-After, and abort on the timeout budget (default 30s, set via timeoutMs).

Development

npm install
npm run lint
npm run typecheck
npm test
npm run build

The REST contract is pinned in openapi/ (see openapi/IL_RUNTIME_VERSION). Regenerate types with npm run codegen after bumping the pin.

License

Apache-2.0