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

@wierdbytes/pi-autosk

v0.1.0

Published

pi extension that exposes the autosk management tools (task / comment / step) for AI agents.

Downloads

102

Readme

pi-autosk

pi extension that wraps the autosk CLI as a small set of LLM-callable tools. The agent stops shelling out to bash autosk ... and gets a structured, rendered task tracker instead.

Layout

extension/
├── package.json          # pi.extensions → ./src/index.ts
├── tsconfig.json
├── README.md
├── test/
│   └── smoke.ts          # end-to-end smoke against a real `autosk` binary
└── src/
    ├── index.ts          # extension factory: registers the three tools
    ├── cli.ts            # spawn + error normalization + JSON parsing
    ├── types.ts          # wire types (Task, Comment, StepSignal, details union)
    ├── task.ts           # tool `autosk_task`     — create / update / show
    ├── comment.ts        # tool `autosk_comment`  — add / list
    └── step.ts           # tool `autosk_step`     — next

Tool surface

Three tools, each with a { action, args } shape:

autosk_task

| action | required args | optional args | |---------|-------------------------------------------------------|-------------------------------------------------------------------------------| | create | title | description, priority (0..3), blocks[], blocked_by[], workflow, agent, step | | update | id + at least one of title/description/priority/status | — | | show | id | — |

details = { kind: "task", domain: "task", action, task }. The task object carries blocked_by, blocks, blocked, plus workflow_id / current_step / current_agent when the task is inside a workflow.

workflow and agent are mutually exclusive. step requires workflow. Status edits on work tasks are rejected by autosk — advance via autosk_step instead.

status values: new | work | human | done | cancel (every spelling is at most 7 characters). Legacy spellings (in_workflow, human_feedback, cancelled) are rejected at the JSON-RPC schema boundary.

autosk_comment

| action | required args | optional args | |--------|--------------------------|---------------| | add | task_id, text | author | | list | task_id | — |

details = { kind: "comment", ... } for add, details = { kind: "comments", task_id, comments } for list. Comments are immutable; "edits" are appended as new comments.

autosk_step

| action | required args | |--------|--------------------------| | next | task_id, to |

to is a sibling step name in the current workflow, or one of done / cancel / human. Records a step_signals row that the autosk daemon consumes after the agent's turn ends.

details = { kind: "step_signal", domain: "step", action: "next", signal: {...} }.

step next may be called at most once per active run; calling it without an active run (e.g. on a status='new' task) returns kind: "error" with reason: "cli_error".

Errors

Every tool normalizes failures into:

details = {
  kind: "error",
  domain: "task" | "comment" | "step",
  action: <string>,
  reason: "missing_binary" | "invalid_args" | "cli_error" | "parse_error" | "aborted",
  message,
  stderr?, stdout?,
}

Renderer

Each tool ships its own renderCall / renderResult:

  • autosk_task — single-task block (id, status badge, title, description, workflow/step/agent line, dep summary).
  • autosk_comment — table-style list, or single-comment block on add.
  • autosk_steptask_id run=… header + colored target line + rule.
  • error — red one-liner + dim detail (consistent across tools).

Install (development)

The autosk binary must be on $PATH:

cd ~/me/dev/autosk
make build           # writes ./bin/autosk
export PATH="$PWD/bin:$PATH"   # or symlink into /usr/local/bin

Then expose the extension to pi. Pick one:

# 1. Per-project: drop a symlink so pi auto-discovers it.
mkdir -p .pi/extensions
ln -s ~/me/dev/autosk/extension .pi/extensions/autosk

# 2. Global: same, under your pi config dir.
mkdir -p ~/.pi/agent/extensions
ln -s ~/me/dev/autosk/extension ~/.pi/agent/extensions/autosk

# 3. Explicit: add to ~/.pi/config.json
#    { "extensions": ["~/me/dev/autosk/extension"] }

pi reads package.json#pi.extensions and loads ./src/index.ts from this directory.

Typecheck / smoke

cd extension
npm install
npm run typecheck

# Real end-to-end (needs `autosk` on PATH):
node --experimental-strip-types test/smoke.ts

The smoke test creates a throwaway .autosk/db in $TMPDIR, exercises every positive path on autosk_task and autosk_comment, and verifies that autosk_step propagates both invalid_args (missing to) and cli_error (no active run) correctly.