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

foundry-trace-inspector-core

v0.2.2

Published

Headless library for connecting to Microsoft Foundry and normalizing agent traces into a clean, typed model.

Readme

foundry-trace-inspector-core

npm CI License: MIT

Connect to Microsoft Foundry and normalize agent traces into a clean, typed model.

A headless library for fetching Microsoft Foundry agent traces and normalizing them into a clean, typed model you can build on — dashboards, CI assertions, scripts, or any tooling of your own. Just the Foundry client and the trace normalizer, no UI.

Works for any model hosted on Foundry (GPT, Claude, Grok, Kimi, and others).

Install

npm install foundry-trace-inspector-core

Quick start

import { fetchResponsesTrace } from "foundry-trace-inspector-core";

const config = {
  projectEndpoint: "https://my-hub.services.ai.azure.com/api/projects/my-project",
  authMethod: "apiKey",       // or "entraId"
  maxRunsToList: 20,
  responseIds: [],
  conversationIds: [],
};

const agents = await fetchResponsesTrace(config, ["resp_abc123"], {
  apiKey: process.env.FOUNDRY_API_KEY,
});

console.log(JSON.stringify(agents, null, 2));

Authentication

  • API key — set authMethod: "apiKey" and pass apiKey. The key is sent as the api-key header.
  • Entra ID — set authMethod: "entraId". Uses DefaultAzureCredential (az login, managed identity, environment variables, etc.). Requires a Node.js environment.

API

| Export | Description | | --- | --- | | fetchResponsesTrace(config, responseIds, opts?) | Fetch responses by ID and normalize them into TraceAgent[]. | | fetchConversationTrace(config, conversationId, opts?) | Fetch a full conversation (with per-response metadata) and normalize it. | | openFoundryOpenAI(config, apiKey?) | Get a raw OpenAI-compatible client pointed at the project's /openai/v1 surface. | | createClient(config, apiKey?) | Build the underlying AIProjectClient. | | normalizeFromResponses(responses) | Normalize already-fetched responses. | | normalizeFromConversationItems(id, items, metas?) | Normalize already-fetched conversation items. |

Types: FoundryConfig, AuthMethod, TraceAgent, TraceSession, TraceStep, LlmStep, ToolCallStep, MessageStep, TokenUsage, Logger.

fetchResponsesTrace / fetchConversationTrace accept an options object with an optional apiKey (required for API-key auth) and a logger for diagnostics.

License

MIT © Jubin Soni