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

@retinue/tools-azure

v0.3.0

Published

Azure tools for a Retinue agent: read-first inspection of subscriptions, resources, metrics and logs — two gated writes and no provisioning.

Readme

@retinue/tools-azure

Azure tools for a Retinue agent: read-first inspection of an Azure estate, with two gated writes and no way to provision anything.

npm i @retinue/tools-azure

Why this one is read-first

Everywhere else in this catalogue a gated write costs a person an approval click if it was wrong. Here it can cost a production environment. So there is no create, no delete, no scale, no deployment and no role assignment — see Limits on the integration page, which states that as a decision rather than apologising for a gap.

Tools

Seven reads, satisfied by a single Reader assignment:

azure_list_subscriptions · azure_list_resource_groups · azure_list_resources · azure_get_resource · azure_query_logs · azure_get_metrics · azure_list_activity_log

Two writes, both gated and both requiring an idempotency key:

  • azure_tag_resource — external-write. Metadata only, and it merges: tags this call did not name are kept. Tag Contributor.
  • azure_restart_resource — destructive. Causes an outage, is not idempotent from a user's point of view, and refuses any resource type outside a short allowlist.

Usage

import { withRefreshingCredentials } from "@retinue/agentkit/tools";
import type { CredentialRefresher, CredentialResolver } from "@retinue/agentkit/tools";
import { createAzureToolkit } from "@retinue/tools-azure";

// Yours: reads the stored connection, and exchanges the sealed refresh token for a new ARM access token.
declare const connectionResolver: CredentialResolver;
declare const azureRefresher: CredentialRefresher;

const toolkit = createAzureToolkit({
  credentialRef: "azure",
  // An ARM token lives about an hour; without this the toolkit stops working mid-task.
  resolver: withRefreshingCredentials(connectionResolver, azureRefresher),
  exclude: ["azure_restart_resource"],
});

credentialRef only. Not the ambient az CLI login, not managed identity, and no environment variable — all three make a toolkit that works on the machine where it was configured and nowhere else.

Behaviour worth knowing

  • A 403 is either a missing role or a dead credential, and Azure uses the same status for both. This package reads Azure's error code and reports forbidden or unauthorized accordingly; the forbidden message names the denied action and the role that would permit it.
  • Retry-After is honoured, and the remaining per-subscription read budget is reported in the message.
  • azure_query_logs requires a time span and refuses an over-wide one rather than shortening it. A query silently narrowed answers a different question and reports success.
  • Resource ids are validated locally, which is both a usability and a security boundary — a name containing ?, # or % is refused rather than encoded into an authenticated ARM URL.

MIT.