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

@caio.silveira/taskkit-core

v0.1.1

Published

Programmatic local-first, AI-first project state engine

Readme

Task Kit Core

@caio.silveira/taskkit-core is the programmatic, local-first, AI-first project state engine underlying Task Kit.

It manages the project directory workspace, file loading, data serialization, schema migrations, and concurrency locks. It is designed to be purely programmatic, with zero terminal formatting or CLI dependencies, making it safe and clean to use inside Node.js applications or custom integrations.


Installation

Install the package via npm:

npm install @caio.silveira/taskkit-core

Programmatic Usage Example

Here is a quick example of how to load the engine and interact with the task state programmatically:

import { TaskKitEngine } from '@caio.silveira/taskkit-core';

async function main() {
  // Find project root and load the state engine
  // This automatically runs any required schema migrations and acquires a project lock
  const engine = await TaskKitEngine.load(process.cwd());

  try {
    // 1. Get current project config and tree structure
    const config = engine.getConfig();
    const tree = engine.getTree();
    console.log(`Loaded project with ${Object.keys(tree.nodes).length} nodes.`);

    // 2. Create a new task node
    const newNode = await engine.createNode('Implement Database Cache', {
      description: 'Use Redis for caching database query results.',
      tags: ['backend', 'performance']
    });
    console.log(`Created node with ID: ${newNode.id} and Slug: ${newNode.slug}`);

    // 3. Mark a task completed
    await engine.completeNode(newNode.id);
    console.log('Task marked completed successfully.');
    
  } finally {
    // Crucial: Release the file lock when finished
    await engine.release();
  }
}

main().catch(console.error);

API Summary

The TaskKitEngine class exposes the following core operations:

  • Lifecycle:
    • TaskKitEngine.load(path): Loads the database, executes migrations if needed, and locks the state files.
    • engine.release(): Releases the active file locks.
  • Queries:
    • engine.getConfig(): Returns project configurations (config.json).
    • engine.getTree(): Returns the tree registry hierarchy (tree.json).
    • engine.getNode(idOrPath): Returns detailed node data including description, timestamps, and tags.
    • engine.findNode(idOrPath): Resolves full/relative path slugs or IDs to the target node.
  • Mutations:
    • engine.createNode(title, options): Creates a new leaf node in the hierarchy.
    • engine.updateNode(idOrPath, updates): Updates a node's details.
    • engine.moveNode(idOrPath, newParentIdOrPath): Moves a node to another parent in the tree hierarchy.
    • engine.completeNode(idOrPath): Marks a node and all of its children as completed.
    • engine.reopenNode(idOrPath): Reopens a completed node.
    • engine.archiveNode(idOrPath): Archives a node.
    • engine.deleteNode(idOrPath): Recursively deletes a node and its children from the database.
  • Agent Checkpoint & Handover:
    • engine.checkpointNode(idOrPath, checkpointData): Records progress details (checkpoints) for AI assistants to resume.
    • engine.resumeNode(idOrPath): Retrieves the active agent progress checkpoint.