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

@namzu/google

v1.1.1

Published

Native Gemini API and Gemini CLI OAuth provider for the Namzu agent kernel.

Readme

@namzu/google

Native Google Gemini GenerateContent provider for the Namzu SDK. Supports Gemini API keys and an existing Gemini CLI OAuth account through Code Assist. This package owns transport, not login or credential storage.

import { GoogleProvider } from '@namzu/google'

const provider = new GoogleProvider({ apiKey: process.env.GEMINI_API_KEY })
for await (const chunk of provider.chatStream({
  model: 'gemini-2.5-flash',
  messages: [{ role: 'user', content: 'Hello', timestamp: Date.now() }],
})) {
  if (chunk.delta.content) process.stdout.write(chunk.delta.content)
}

For Gemini CLI accounts, supply getAccessToken(signal) instead of apiKey. The host callback must refresh expired tokens and honor cancellation. Optional projectId selects an already configured Code Assist project; otherwise loadCodeAssist discovers the current account's managed project. Uninitialized accounts must complete setup in Gemini CLI: Namzu never automatically enrolls an account or selects a billing tier.

Configuration also accepts timeoutMs (120 seconds by default), a fetch implementation, and a host-level model hint. Each chatStream request's model is authoritative. API keys go to Google's Generative Language API; OAuth tokens only go to Google's Code Assist endpoint. HTTP error bodies are not exposed because they may contain account information.

The driver streams text, thinking summaries and function calls; retains signed native response parts for unchanged, same-route tool history; maps inline image/document inputs and tool results; and maps native JSON Schema output. Unsupported explicit controls fail before transport. Gemini 2.5 accepts manual thinking budgets, not a fabricated low/high effort menu. Known Gemini 3 Flash and Pro families expose their documented thinking levels. Unknown models have no inferred menu.

API-key model listing uses Google's live generation-model catalogue. Code Assist has no equivalent public catalogue: its conservative menu (Gemini 2.5 Flash and Pro) is a set of candidates, not proof of account entitlement. Additional explicit model IDs can be sent directly to chatStream. Prices are standard text/image API reference prices, in USD per million tokens, not subscription billing; Pro's reference is for prompts up to 200k tokens. For live models without established prices, numeric price fields use the SDK's existing zero sentinel for unknown; this is not a free-tier claim and must not be treated as a billing estimate. Credential probing is separate from listing. Authentication and a particular model's entitlement still require a successful server request.

Transport contracts follow Google's thought-signature guidance, thinking controls, and the Gemini CLI Code Assist source. Runtime-neutral history from another provider cannot preserve Google's native signatures.