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

@argon-agent/core

v0.1.2

Published

ArgonAgent core engine — LLM provider adapters, streaming, tool registry/execution, steering, idle watchdog, and an optional isolated-vm sandbox.

Readme

@argon-agent/core

The publishable ArgonAgent engine: a zero-coupling, dependency-injected TypeScript agent runtime.

Requirements

  • Node.js ≥ 18 — the engine relies on the global fetch / AbortController built into Node 18+.
  • ESM-only — this package ships as native ES modules ("type": "module"). Consume it with import; it cannot be require()-d from CommonJS.
  • Optional native depsajv and isolated-vm are optionalDependencies: the package works without them (a built-in validator fallback is used, and the sandbox modules are lazy-loaded). Install isolated-vm only if you use the @argon-agent/core/sandbox/* CodeAct sandbox.

Install

npm install @argon-agent/core
# optional — only if you use the isolated-vm CodeAct sandbox:
npm install isolated-vm

ajv and isolated-vm are optional dependencies:

  • ajv — used by the tool param validator when present; a built-in fallback validator is used otherwise.
  • isolated-vm — used only by the @argon-agent/core/sandbox/* modules, which are lazy-loaded and never imported from the package root (isolated-vm is incompatible with some embedded V8 runtimes such as Electron's).

Usage

import { ArgonAgent, getProviderRegistry, initProviders } from '@argon-agent/core';

initProviders();

const agent = new ArgonAgent({
  systemPrompt: 'You are a coding agent.',
  model: { providerId: 'anthropic', modelId: 'claude-...', baseUrl: '...' },
  tools: [],
  providerRegistry: getProviderRegistry(),
  getApiKey: () => process.env.ANTHROPIC_API_KEY,
});

await agent.prompt('Hello');

ArgonAgent is an alias of the engine's Agent class.

A complete, type-checked version of this snippet (a dummy tool + provider setup

  • agent construction) lives in examples/minimal.ts. It is compile-only (never hits the network) and is not part of the published tarball.

Entry points

| Import path | Contents | | -------------------------------- | ----------------------------------------- | | @argon-agent/core | Full barrel (engine, LLM, tools, types). | | @argon-agent/core/llm/types | LLM message / streaming / model types. | | @argon-agent/core/llm/providers| Provider registry + streamLLM/completeLLM. | | @argon-agent/core/tools/types | Tool system types. | | @argon-agent/core/tools/helpers| textResult / errorResult / defineTool. | | @argon-agent/core/sandbox/* | Optional isolated-vm CodeAct sandbox. |

Build

npm run build   # tsc → dist/*.js + *.d.ts
npm test        # vitest (smoke + public-api contract + no-host-coupling guard)

Verifying reuse

npm test and examples/minimal.ts only prove the package compiles. To prove the built dist/ can actually be run by an external consumer:

npm run verify:dist   # build dist/, then run examples/consumer-smoke/run.mjs

run.mjs imports this package by its own name (@argon-agent/core) via Node's package self-referencing, so Node resolves it through package.json#exports./dist/index.js — the same (exports map + NodeNext + .js extension) path that an external project's npm install @argon-agent/core hits, without placing the package in node_modules. It injects an offline stub LLM provider, runs one ArgonAgent.prompt() turn end-to-end (zero network), and asserts the exports subpaths all resolve at runtime. Success prints [consumer-smoke] OK.

For the unambiguous "another project installs and reuses it" check (which also covers running without the optional ajv / isolated-vm deps), see the pack-into-a-fresh-project golden verification in examples/consumer-smoke/README.md.

The runtime public-API surface is frozen by src/__tests__/public-api.test.ts and documented for humans in API.md; a no-host-coupling test keeps the package free of host-repo imports and legacy brand leakage.

Publishing

This package is published to the public npm registry. Run the release from the package directory so the package-level prepublishOnly hook fires and a fresh dist/ is built:

cd packages/core
npm run build                 # produce dist/
npm pack --dry-run --json     # inspect the tarball file list (no upload)
npm publish                   # publishConfig.access:"public" is baked in

(From the repo root you can equivalently run npm publish -w packages/core.)

Notes:

  • publishConfig.access is set to "public", so no --access public flag is needed — scoped packages would otherwise default to restricted/private.

  • The publishing account must own the @argon-agent npm scope/org before the first publish. Even with access:"public", publishing under a scope you do not own fails with 403/404. Create the @argon-agent org on npmjs (or switch to a scope your account owns and rename the package accordingly).

  • files is the load-bearing whitelist. The repo's .gitignore ignores dist/, but npm's files: ["dist", "CHANGELOG.md"] takes precedence and ships the built output. Do not "simplify" the files field away, or the published tarball will be empty. npm pack --dry-run --json should always list dist/index.js.

  • Repository metadata points to https://github.com/xdrshjr/ArgonAgent.

    If the repository moves, use the helper script or update repository / homepage / bugs before publishing:

    node scripts/stamp-org.mjs <org>     # or: ARGON_REPO_ORG=<org> node scripts/stamp-org.mjs
    node scripts/check-publishable.mjs   # exits non-zero if the placeholder remains in package.json

    prepublishOnly runs check-publishable.mjs before the build, so any publish attempt with an unstamped placeholder is hard-blocked automatically.

License

MIT.