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

@autosk/worktree

v0.1.3

Published

Shipped autoskd v2 isolation provider: per-task git worktree isolation (worktreeIsolation()) attachable to any workflow.

Readme

@autosk/worktree

The shipped isolation provider for autoskd v2: per-task git worktree isolation, attachable to any workflow. It ports v1's worktree behaviour onto the v2 IsolationProvider contract (design docs/plans/20260612-Bun-Daemon-Extensions.md §3.5).

Usage

import { statusStep } from "@autosk/sdk";
import { piAgent } from "@autosk/pi-agent";
import { worktreeIsolation } from "@autosk/worktree";

autosk.registerWorkflow({
  name: "feature-dev",
  firstStep: "dev",
  // Agents are inline step values (the step key is the agent name).
  steps: { dev: piAgent({ firstMessageFile: ".../dev.md" }), accept: statusStep("human") },
  isolation: worktreeIsolation(),
});

Each isolated task runs in its own checkout so concurrent tasks never collide on the working tree. The engine calls acquire before scheduling each session (its returned cwd becomes ctx.cwd) and reap only on a terminal transition (done/cancel). This provider has no live env to stop, so it omits release entirely — keeping the checkout on disk across sibling/human-park steps is exactly the absence of teardown.

Behaviour

Deterministic mapping — byte-identical to v1, so a worktree allocated by either stack resolves to the same place:

~/.autosk/worktrees/<basename(canonRoot)>-<8hex(sha256(canonRoot))>/<task-id>
branch = autosk/<task-id>
  • acquire (ensure-ready) — allocates the per-task worktree on branch autosk/<task-id> (off HEAD), or re-uses it when a prior step kept it. A missing dir is re-allocated on the existing branch (v1 "missing worktree auto-recovery"). Idempotent and re-entered per step. Returns { cwd, meta: { branch, projectRoot } }.
  • (no release) — sibling step and human-park keep the dir on disk untouched, so the next acquire re-uses the same checkout. There is nothing to quiesce, so the method is omitted.
  • reap (destroy-on-terminal, done / cancel) — keyed by (projectRoot, taskId), so it works with no live handle (engine terminal, a manual done/cancel after a park, or crash recovery). Removes the worktree dir but preserves the autosk/<task-id> branch (so the work survives for review / merge). With force:false it refuses to discard uncommitted changes and reports { removed:false, dirty:true }; force:true removes regardless.

Failure handling

The provider only throws descriptive messages — the engine wraps them (isolation_acquire_failed: … on acquire, isolation_reap_failed: … on a terminal reap) and parks the task to human. It never parks or formats those prefixes itself. Throw cases:

  • non-git rootnot a git repository: <root> (the project root isn't a git repo).
  • stranded dirworktree_stranded: … (a directory sits at the worktree path whose gitdir doesn't resolve to the project's — e.g. a foreign repo).
  • git missinggit binary not found on PATH.

Configuration

worktreeIsolation(options?):

| Option | Default | Description | | -------- | ------------------ | --------------------------------------------------------------------------- | | home | process.env.HOME | Home dir the worktree tree lives under (<home>/.autosk/worktrees/…). Tests inject a temp home. | | gitBin | "git" | git binary to shell out to. |

Exports

  • worktreeIsolation(options?)IsolationProvider
  • branchFor(taskId), pathFor(projectRoot, taskId, home?), slugFor(canon) — the deterministic derivation helpers (exported for tooling / tests).
  • WORKTREE_TAG — the provider tag ("worktree") rendered by workflow.get.