Skip to content
PluginStats

@stateforge-labs/harness-adapters weekly downloads statistics

By stateforge-labs · npm · Claude Code

Harness knowledge beyond hooks: transcript and store readers, in-flight detection, CLI invocation, usage and context windows, tool facts and TUI chrome for Claude Code, Codex and OpenCode.

View on npm Fresh · Dec 5, 2026

@stateforge-labs/harness-adapters has 2,430 recorded weekly downloads on npm, a change of -60.8% over the past 7 days, ranking #1823 of 3,247 tracked listings.

Weekly downloads
2,430
Official API · Dec 5, 2026
7-day growth
-60.8%
-3.8K weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1823
Among tracked npm listings

About @stateforge-labs/harness-adapters

@stateforge-labs/harness-adapters

Harness knowledge that is not a hook, for Claude Code, Codex and OpenCode: transcript and store readers, in-flight and background detection, CLI invocation, usage and context windows, tool facts, TUI screen chrome, a headless runtime that runs each harness's CLI and an agent facet that runs a harness through its vendor SDK. One module per harness. It is built on @stateforge-labs/harness-hooks, which holds the hook events, the closed value sets and the schemas.

Install

bun add @stateforge-labs/harness-adapters
npm install @stateforge-labs/harness-adapters

The Claude engine of the agent facet needs @anthropic-ai/claude-agent-sdk, an optional peer dependency that this package does not install. Add it, at exactly the version the engine is written against, only if you start agent runs:

bun add --exact @anthropic-ai/claude-agent-sdk@0.3.316
npm install --save-exact @anthropic-ai/claude-agent-sdk@0.3.316

Node 22.13 or later, or Bun. The package uses no Bun API in its shipped code.

Usage

import { adapterEnv } from "@stateforge-labs/harness-adapters";

const env = adapterEnv();
console.log(env.codexHome);

adapterEnv(source?) reads HOME, XDG_DATA_HOME and CODEX_HOME from source (default process.env). An unset or empty variable takes its default: HOME falls back to the home directory, XDG_DATA_HOME to $HOME/.local/share, CODEX_HOME to $HOME/.codex. Pass an explicit object to test a module without touching the real environment.

Subpaths

ImportWhatTier
@stateforge-labs/harness-adaptersadapterEnv, EnvVar, AdapterEnv, EnvSource0.x, stable within 0.x
@stateforge-labs/harness-adapters/claudethe Claude Code module0.x, stable within 0.x
@stateforge-labs/harness-adapters/codexthe Codex module0.x, stable within 0.x
@stateforge-labs/harness-adapters/opencodethe OpenCode module0.x, stable within 0.x
@stateforge-labs/harness-adapters/opencode/storethe OpenCode store reader. It imports node:sqlite, which prints an ExperimentalWarning on Node 22 (checked on 22.23); the other subpaths never load it0.x, stable within 0.x
@stateforge-labs/harness-adapters/tuithe TUI screen chrome0.x, stable within 0.x
@stateforge-labs/harness-adapters/runtimecreateRuntime, Harness, credentials, policy, results, failures and the agent types0.x, stable within 0.x
@stateforge-labs/harness-adapters/enginethe CLI engine contract for building a harness driverexperimental
@stateforge-labs/harness-adapters/testingfakeRuntime, fakeProcessRunner, fakeFs, fakeClock, the driver contract checks, and for the agent facet fakeAgentEngine, fakeClaudeQuery, claudeMessages, fakeTranscriptStore, scriptedMessagesApi and agentContract0.x, stable within 0.x
@stateforge-labs/harness-adapters/jsonlJSONL line readers: readLines, tailOf, tailLines, readJsonl, growTail, and the row helpers parseRow, rowOf, rowsOf, textOf0.x, stable within 0.x
@stateforge-labs/harness-adapters/textunfenced (strips one code fence around an answer) and fitBytes (keeps the newest lines that fit a byte budget)0.x, stable within 0.x
@stateforge-labs/harness-adapters/telemetryRESOURCE_ATTRIBUTES_ENV, serializeJobAttribute, mergeResourceAttributes and withJobAttribute, which add one job attribute to OTEL_RESOURCE_ATTRIBUTES in an environment objectexperimental

Credentials and policy

A headless run names its credential. The runtime never reads a credential from the environment on its own.

ModeHarnessWhat it means
api-keyClaude, Codex, OpenCodea secret(...) value is injected for the run. Claude also takes a baseUrl
login-storeClaude, Codex, OpenCodethe harness reuses its own sign-in. Claude's login store needs acknowledgePolicy: true
tokenClaudea bearer token, with acknowledgePolicy: true
cloudClaudethe harness's cloud provider settings

runtime.policyNotice(harness, mode) returns the notice a consumer shows before the mode is used. A run whose mode needs acknowledgement and is not acknowledged fails with policy-not-acknowledged before anything is spawned. createRuntime({ allowedModes }) refuses every mode not in the list with credential-unsupported. runtime.credentialFrom(harness, spec) builds and checks a credential and reports a credential failure for a missing or empty field. secret(value) wraps a credential value so that it is not handled as plain text.

Quick start

import { createRuntime, Harness } from "@stateforge-labs/harness-adapters/runtime";

const QUESTION = "What is a monad, in one sentence?";

async function main(): Promise<number> {
  await using runtime = createRuntime();
  const claude = runtime.headless(Harness.Claude, {
    credential: { mode: "login-store", acknowledgePolicy: true },
  });
  const result = await claude.run({ instructions: "Answer in one short sentence.", input: QUESTION });
  if (!result.ok) {
    console.error(`${result.failure.kind}: ${result.failure.message}`);
    return 1;
  }
  console.log(result.value.text);
  return 0;
}

process.exitCode = await main();

run returns a Result: { ok: true, value } or { ok: false, failure }. Branch on failure.kind (see Errors). headless(...) also returns plan(...), to see the invocation without running it, and stream(...), which yields events as the run progresses.

Agent runs…

Description from the npm listing.

  • claude-code
  • codex
  • opencode
  • transcript
  • coding-agent
  • zod

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@stateforge-labs/harness-adapters weekly downloads on npm, last 90 days: 2,430 weekly downloads as of Dec 5, 2026.@stateforge-labs/harness-adaptersWeekly downloads on npm · Last 90 days2,430downloads / week01K2K3K4K5K6K7KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@stateforge-labs/harness-adapters weekly downloads on npm, last 90 days: 2,430 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

@stateforge-labs/harness-adapters weekly downloads growth on npm: -60.8% over 7 days, 30-day growth unavailable, 90-day growth unavailable.@stateforge-labs/harness-adaptersWeekly downloads growth on npm2,430downloads / week now7-day growth-3,769 weekly downloads-60.8%30-day growth+2,430 weekly downloadsInsufficient history90-day growth+2,430 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@stateforge-labs/harness-adapters weekly downloads growth on npm: -60.8% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@stateforge-labs/harness-adapters npm ranking history: currently #1823 (by weekly downloads).@stateforge-labs/harness-adaptersnpm ranking · by weekly downloads · Last 90 days#1823current rank#1400#1500#1600#1700#1800#1900Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankDec 5, 2026 – Dec 6, 2026 · 2 observations · Updated Dec 5, 2026pluginstats.com
@stateforge-labs/harness-adapters npm ranking history: currently #1823 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 92, #3 (overall #1,823)
All npm: every listing in weekly downloads order

Listing placement

Claude Code614 listings · 31 pages · page 16, #18 (overall #318)
Claude Code: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (121)
Recent weekly downloads observations for @stateforge-labs/harness-adapters
Date (UTC)Weekly downloadsChange vs. previous
2,430-345
2,775-877
3,652-1.3K
4,988+398
4,590-86
4,676-981
5,657-542
6,199-68
6,267+125
6,142+299
5,843-852
6,695+531
6,164+1.1K
5,064—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@stateforge-labs/harness-adapters. First seen Dec 5, 2026; last successful collection Dec 5, 2026. See the methodology.