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

@usine/core

v0.3.0

Published

Domain model for usine: Event → Run → Step → Attempt, branded ids, the run state machine, and the typed attempt-failure taxonomy.

Readme

@usine/core

Domain model for usine, an agent-agnostic software factory: the Event → Run → Step → Attempt vocabulary every other block types against, plus the shared instance, repository, worker, and agent values.

Import each domain concept from its owning subpath. Identities, records, and operations share that domain module.

| Subpath | Exports | | --- | --- | | @usine/core/event | Event, EventId, DedupKey | | @usine/core/run, @usine/core/run/state | Run, RunId; the run state machine as a tagged union with typestate transitions (RunState.start, RunState.supersede, ...) | | @usine/core/step, @usine/core/step/result | Step, StepName; StepResult and its facts (Commit, PullRequest, Comment) | | @usine/core/attempt | Attempt, AttemptId, AttemptNumber, AttemptTask, shouldAutoRetry | | @usine/core/attempt/outcome | AttemptSucceeded, AttemptFailed, AttemptCanceled, AttemptOutcome | | @usine/core/attempt/failure | InfraFailure, DefectFailure, AgentFailure, RunawayFailure, ChildSessionBudgetFailure, AttemptFailure, isAutoRetryableFailure | | @usine/core/attempt/channel | The protocol-v4 attempt channel: RunSpec, Start, the envelopes, and the admit reducer. Import it as a namespace (AttemptChannel.Started) | | @usine/core/agent, @usine/core/agent/brain, @usine/core/agent/session | Agent, AgentName, AgentPersona, parent-model resolution; BrainSpec, ModelId, Harness, Effort; AgentSessionId, session descriptors, AgentSessionEvent, ChildSessionBudget, ChildSessionCount | | @usine/core/agent/capability | HarnessCapability, HarnessReady, HarnessUnavailableError, and the credential-free HarnessReadiness preflight response | | @usine/core/repository | RepositoryName, RepositoryRevision, CommitSha, splitRepositoryName, canonicalRepositoryName | | @usine/core/worker, @usine/core/item, @usine/core/loop, @usine/core/instance | WorkerName, WorkerKind; ItemKey, ItemNumber; LoopName, ApprovalRequirement; InstanceDirectory |

Branded schemas are exported under their brand name, and each has an export type twin of the same name so the name works in type positions too.

PullRequest and Comment facts use URL values in memory and URL strings in JSON, so Step results round-trip through the Attempt channel and durable storage.

The run state machine is pending → waiting → queued → running → succeeded / failed / canceled, with failed → running on operator retry. The failure taxonomy separates infra failures (the only auto-retryable class, capped), agent failures (always wait for the operator), runaway guard failures, and exhausted child-session budgets. Guard failures never auto-retry.

RunState.operatorActions(state) returns approval, retry, and cancel availability for operator views. The command handlers enforce the same lifecycle through the typed transitions.

Each Attempt records the child BrainSpec and effective Pi parent model used for that try. The attempt channel includes immutable repository, payload, task, agent context, and child-session budget in its Start frame; outbound SessionEvent envelopes retain parent and first-level child session identity.

Everything is 0.x: APIs change without notice while the engine grows. effect is a peer dependency — supply it yourself at the pinned version.

Import CycleLimit, CycleGeneration, CycleCount, LoopCycleCount, and CycleBudgetAsk from @usine/core/cycle-budget. An Item-level Ask records the exhausted Loop, its limit, and participating Loops’ admitted and completed Runs; it can exist before another Run is opened.

DefectFailure records a programmer defect captured at a boundary that needs a serializable Attempt outcome. It retains the original cause and never qualifies for automatic retry.

SessionStarted.harnessSession optionally records a HarnessSession: the harness-native HarnessSessionId and worker working directory (cwd). Missing metadata in older transcripts decodes to Option.none(); usine's session identity remains separate.

Attempt channel protocol v6 adds saved harness session metadata. Upgrade the orchestrator and run host together; worker preflight rejects mismatched protocol versions.