{"_id":"@caio.silveira/taskkit-core","_rev":"3-6289cfd04c7fdfe76b133de2813c3331","name":"@caio.silveira/taskkit-core","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@caio.silveira/taskkit-core","version":"0.1.0","keywords":["taskkit","project-management","task-manager","local-first","ai-first","state-engine"],"author":{"name":"Caio Silveira"},"license":"MIT","_id":"@caio.silveira/taskkit-core@0.1.0","maintainers":[{"name":"caio.silveira","email":"caiosilveira63@gmail.com"}],"homepage":"https://github.com/CaioSilveira63/Taskkit#readme","bugs":{"url":"https://github.com/CaioSilveira63/Taskkit/issues"},"dist":{"shasum":"def63e4b1e66a0f9f9e2dab5cbc8b828ce4ce9f2","tarball":"https://registry.npmjs.org/@caio.silveira/taskkit-core/-/taskkit-core-0.1.0.tgz","fileCount":19,"integrity":"sha512-JuyzU43/ddybdIFGa3qk7jbB5IIDvvVzZgerdWbVZEYTFG8l1O0NmfY5PCYF2Sgztzr6+2YDTP6k2f9IKpQVng==","signatures":[{"sig":"MEYCIQDi90Kzz0r6wzMVmtEPveaoNd1T61b+52WQCOP9mNlIgwIhAOimI33lV6u3xwOxJi1XVsgw7nH8O1ieJA8onoBJDghZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64969},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"35af9f35ffdf6f19fae355ee7255f898b001baaa","scripts":{"test":"node --test dist/**/*.test.js","build":"tsc","coverage":"node --experimental-test-coverage --test dist/**/*.test.js"},"_npmUser":{"name":"caio.silveira","email":"caiosilveira63@gmail.com"},"repository":{"url":"git+https://github.com/CaioSilveira63/Taskkit.git","type":"git"},"_npmVersion":"11.12.1","description":"Programmatic local-first, AI-first project state engine","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/taskkit-core_0.1.0_1784167057895_0.7863023069973887","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@caio.silveira/taskkit-core","version":"0.1.1","keywords":["taskkit","project-management","task-manager","local-first","ai-first","state-engine"],"author":{"name":"Caio Silveira"},"license":"MIT","_id":"@caio.silveira/taskkit-core@0.1.1","maintainers":[{"name":"caio.silveira","email":"caiosilveira63@gmail.com"}],"homepage":"https://github.com/CaioSilveira63/Taskkit#readme","bugs":{"url":"https://github.com/CaioSilveira63/Taskkit/issues"},"dist":{"shasum":"10fbf334e4a05f24f158f59e37408c5de0f53f3b","tarball":"https://registry.npmjs.org/@caio.silveira/taskkit-core/-/taskkit-core-0.1.1.tgz","fileCount":20,"integrity":"sha512-HtxddNGt4DYwnNwlQ+zGQlKy+7WUvnFfhrNX78RY3zyw2qrjW3zUEpZzhyqlV62quAcNXAmHUXxUtvlLahtvxw==","signatures":[{"sig":"MEYCIQDSpdPRYLNWhWEwdwjl748VstWHkqF61PCAjz9iixqVcQIhAPgTSkY4TCfcVXm0H3oXYZbBsVYHJmZH9+YFCB6XOxQd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68185},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"35af9f35ffdf6f19fae355ee7255f898b001baaa","scripts":{"test":"node --test dist/**/*.test.js","build":"tsc","coverage":"node --experimental-test-coverage --test dist/**/*.test.js"},"_npmUser":{"name":"caio.silveira","email":"caiosilveira63@gmail.com"},"repository":{"url":"git+https://github.com/CaioSilveira63/Taskkit.git","type":"git"},"_npmVersion":"11.12.1","description":"Programmatic local-first, AI-first project state engine","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/taskkit-core_0.1.1_1784167406521_0.5949432659846066","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@caio.silveira/taskkit-core","version":"0.1.2","description":"Programmatic local-first, AI-first project state engine","main":"./dist/index.js","types":"./dist/index.d.ts","type":"module","author":{"name":"Caio Silveira"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/CaioSilveira63/Taskkit.git"},"bugs":{"url":"https://github.com/CaioSilveira63/Taskkit/issues"},"homepage":"https://github.com/CaioSilveira63/Taskkit#readme","keywords":["taskkit","project-management","task-manager","local-first","ai-first","state-engine"],"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","test":"npm run build && node --test dist/**/*.test.js","coverage":"npm run build && node --experimental-test-coverage --test dist/**/*.test.js"},"gitHead":"4ec9a7323391f9bedb0003f9e38472c566993c35","_id":"@caio.silveira/taskkit-core@0.1.2","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-YpUov81K3H0zhKZFLttKsKdL0noVeQmi9h+7ZLGN1p9ZEZQCygckujAPVRA/g6/yEgHmgX4RYK8wiEzOSWi1ZQ==","shasum":"3a572a6ee277313b360fd83ca9190c6f21a349d5","tarball":"https://registry.npmjs.org/@caio.silveira/taskkit-core/-/taskkit-core-0.1.2.tgz","fileCount":20,"unpackedSize":76042,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDna8if9yPXeqEwg0/jcmEkwUyjYLFHxP7PI3kL4dQAkAiAIVgeEOZWkK1gCc9IpKEa3gOR9UFIewVQET0+weMmz8w=="}]},"_npmUser":{"name":"caio.silveira","email":"caiosilveira63@gmail.com"},"directories":{},"maintainers":[{"name":"caio.silveira","email":"caiosilveira63@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/taskkit-core_0.1.2_1785982185937_0.8638182951738367"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T01:57:37.778Z","modified":"2026-08-06T02:09:46.294Z","0.1.0":"2026-07-16T01:57:38.037Z","0.1.1":"2026-07-16T02:03:26.659Z","0.1.2":"2026-08-06T02:09:46.146Z"},"bugs":{"url":"https://github.com/CaioSilveira63/Taskkit/issues"},"author":{"name":"Caio Silveira"},"license":"MIT","homepage":"https://github.com/CaioSilveira63/Taskkit#readme","keywords":["taskkit","project-management","task-manager","local-first","ai-first","state-engine"],"repository":{"type":"git","url":"git+https://github.com/CaioSilveira63/Taskkit.git"},"description":"Programmatic local-first, AI-first project state engine","maintainers":[{"name":"caio.silveira","email":"caiosilveira63@gmail.com"}],"readme":"# Task Kit Core\n\n`@caio.silveira/taskkit-core` is the programmatic, local-first, AI-first project state engine underlying Task Kit. \n\nIt 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.\n\n---\n\n## Installation\n\nInstall the package via npm:\n\n```bash\nnpm install @caio.silveira/taskkit-core\n```\n\n---\n\n## Programmatic Usage Example\n\nHere is a quick example of how to load the engine and interact with the task state programmatically:\n\n```typescript\nimport { TaskKitEngine } from '@caio.silveira/taskkit-core';\n\nasync function main() {\n  // Find project root and load the state engine\n  // This automatically runs any required schema migrations and acquires a project lock\n  const engine = await TaskKitEngine.load(process.cwd());\n\n  try {\n    // 1. Get current project config and tree structure\n    const config = engine.getConfig();\n    const tree = engine.getTree();\n    console.log(`Loaded project with ${Object.keys(tree.nodes).length} nodes.`);\n\n    // 2. Create a new task node\n    const newNode = await engine.createNode('Implement Database Cache', {\n      description: 'Use Redis for caching database query results.',\n      tags: ['backend', 'performance']\n    });\n    console.log(`Created node with ID: ${newNode.id} and Slug: ${newNode.slug}`);\n\n    // 3. Mark a task completed\n    await engine.completeNode(newNode.id);\n    console.log('Task marked completed successfully.');\n    \n  } finally {\n    // Crucial: Release the file lock when finished\n    await engine.release();\n  }\n}\n\nmain().catch(console.error);\n```\n\n---\n\n## API Summary\n\nThe `TaskKitEngine` class exposes the following core operations:\n\n* **Lifecycle**:\n  * `TaskKitEngine.load(path)`: Loads the database, executes migrations if needed, and locks the state files.\n  * `engine.release()`: Releases the active file locks.\n* **Queries**:\n  * `engine.getConfig()`: Returns project configurations (`config.json`).\n  * `engine.getTree()`: Returns the tree registry hierarchy (`tree.json`).\n  * `engine.getNode(idOrPath)`: Returns detailed node data including description, timestamps, and tags.\n  * `engine.findNode(idOrPath)`: Resolves full/relative path slugs or IDs to the target node.\n* **Mutations**:\n  * `engine.createNode(title, options)`: Creates a new leaf node in the hierarchy.\n  * `engine.updateNode(idOrPath, updates)`: Updates a node's details.\n  * `engine.moveNode(idOrPath, newParentIdOrPath)`: Moves a node to another parent in the tree hierarchy.\n  * `engine.completeNode(idOrPath)`: Marks a node and all of its children as completed.\n  * `engine.reopenNode(idOrPath)`: Reopens a completed node.\n  * `engine.archiveNode(idOrPath)`: Archives a node.\n  * `engine.deleteNode(idOrPath)`: Recursively deletes a node and its children from the database.\n* **Agent Checkpoint & Handover**:\n  * `engine.checkpointNode(idOrPath, checkpointData)`: Records progress details (checkpoints) for AI assistants to resume.\n  * `engine.resumeNode(idOrPath)`: Retrieves the active agent progress checkpoint.\n","readmeFilename":"README.md"}