{"_id":"@aithericon/hpi-sdk","_rev":"2-084c6dc68833f53203a626c7354d5e12","name":"@aithericon/hpi-sdk","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@aithericon/hpi-sdk","version":"0.1.0","keywords":["human-in-the-loop","api-client","sdk","ai-agents","task-management","openapi"],"author":{"name":"Aithericon GmbH","email":"hello@aithericon.com"},"license":"Apache-2.0","_id":"@aithericon/hpi-sdk@0.1.0","maintainers":[{"name":"milanender","email":"ender@aithericon.com"}],"homepage":"https://hpi.dev","bugs":{"url":"https://github.com/aithericon/hpi/issues"},"dist":{"shasum":"8570dc27bf1cf4999ea799be1064b985b6e5a0dd","tarball":"https://registry.npmjs.org/@aithericon/hpi-sdk/-/hpi-sdk-0.1.0.tgz","fileCount":5,"integrity":"sha512-rSuAADZuUnOFKmHf1DshmRaKQCiFzROpgMbQD2SEKyeiEp+QFhny8B7Ru2J/eguzCubf9SQDa9K25Djl1i+CTw==","signatures":[{"sig":"MEQCIEqx3DHRfeMt+me/zbdW4wKiXuLphivWMOMJJdzugs6kAiA1F3FXjuXzmrc0WqWAZAVLDIcMiF0C+sp1QRPNV8SWiA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59802},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.3.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"570532d761ff43f41813cbadcbe1a8def29afbd7","scripts":{"build":"npm run generate && tsup","generate":"openapi-ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"milanender","email":"ender@aithericon.com"},"repository":{"url":"git+https://github.com/aithericon/hpi.git","type":"git","directory":"packages/hpi-sdk-ts"},"_npmVersion":"10.9.2","description":"TypeScript SDK for the Aithericon HPI API — typed client for human-in-the-loop tasks","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@hey-api/client-fetch":"^0.10.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@hey-api/openapi-ts":"^0.66.0","@hey-api/client-fetch":"^0.10.0"},"_npmOperationalInternal":{"tmp":"tmp/hpi-sdk_0.1.0_1772973534831_0.9011625998417929","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aithericon/hpi-sdk","version":"0.1.3","description":"TypeScript SDK for the Aithericon HPI API — typed client for human-in-the-loop tasks","license":"Apache-2.0","author":{"name":"Aithericon GmbH","email":"hello@aithericon.com"},"homepage":"https://hpi.dev","repository":{"type":"git","url":"git+https://github.com/aithericon/hpi.git","directory":"packages/hpi-sdk-ts"},"bugs":{"url":"https://github.com/aithericon/hpi/issues"},"keywords":["human-in-the-loop","api-client","sdk","ai-agents","task-management","openapi"],"type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.js"}},"scripts":{"generate":"openapi-ts","build":"npm run generate && tsup","prepublishOnly":"npm run build"},"devDependencies":{"@hey-api/client-fetch":"^0.10.0","@hey-api/openapi-ts":"^0.66.0","tsup":"^8.4.0","typescript":"^5.9.3","vitest":"^4.0.18"},"dependencies":{"@hey-api/client-fetch":"^0.10.0"},"engines":{"node":">=18.3.0"},"_id":"@aithericon/hpi-sdk@0.1.3","gitHead":"6227b8e635879d759d24e4f606a66885fa0ba816","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-UxTLVpj9HG4KXgCgaZETa+O8kmMd//lWp7l+cbnvKenoyQkmLhF/twhJ4yx0NeTUOn1Mw+636+ll41nkB7UOSw==","shasum":"96aa47745d3e982b4f9e9fd4315cd815a139cd97","tarball":"https://registry.npmjs.org/@aithericon/hpi-sdk/-/hpi-sdk-0.1.3.tgz","fileCount":7,"unpackedSize":77491,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFA4TIP0Xbw2TsJPgSmD+Jog9maUQ8iKGG/w/EtM9s75AiEA+35lLA+5W2XoLAuALNDliZJZI1PPZpSfT0CNwU3A2y8="}]},"_npmUser":{"name":"milanender","email":"ender@aithericon.com"},"directories":{},"maintainers":[{"name":"milanender","email":"ender@aithericon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hpi-sdk_0.1.3_1773010325071_0.15381353133030995"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-08T12:38:54.770Z","modified":"2026-03-08T22:52:05.360Z","0.1.0":"2026-03-08T12:38:54.984Z","0.1.3":"2026-03-08T22:52:05.225Z"},"bugs":{"url":"https://github.com/aithericon/hpi/issues"},"author":{"name":"Aithericon GmbH","email":"hello@aithericon.com"},"license":"Apache-2.0","homepage":"https://hpi.dev","keywords":["human-in-the-loop","api-client","sdk","ai-agents","task-management","openapi"],"repository":{"type":"git","url":"git+https://github.com/aithericon/hpi.git","directory":"packages/hpi-sdk-ts"},"description":"TypeScript SDK for the Aithericon HPI API — typed client for human-in-the-loop tasks","maintainers":[{"name":"milanender","email":"ender@aithericon.com"}],"readme":"# @aithericon/hpi-sdk\n\nTypeScript SDK for the [Aithericon HPI](https://hpi.dev) API — typed client for human-in-the-loop tasks.\n\nGenerated from the [OpenAPI spec](https://github.com/aithericon/hpi/blob/main/app-hpi/static/openapi.yaml) with full type safety.\n\n## Install\n\n```bash\nnpm install @aithericon/hpi-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { createHPIClient, createTask, waitForTask } from '@aithericon/hpi-sdk';\n\nconst client = createHPIClient({\n  baseUrl: 'https://app.hpi.dev',\n  token: 'htk_your-token',\n});\n\n// Create a task\nconst { data: task } = await createTask({\n  client,\n  body: {\n    title: 'Review deployment plan',\n    steps: [\n      {\n        id: 'review',\n        title: 'Review',\n        blocks: [\n          { type: 'mdsvex', content: 'Please review the deployment plan for **v2.1**.' },\n          { type: 'input', field: { name: 'approved', label: 'Approve?', kind: 'checkbox' } },\n        ],\n      },\n    ],\n  },\n});\n\nconsole.log(`Task created: ${task.task_id}`);\nconsole.log(`Magic link: ${task.url}`);\n\n// Wait for the human to complete it\nconst { data: result } = await waitForTask({\n  client,\n  path: { task_id: task.task_id },\n});\n\nconsole.log(result.status); // \"completed\"\nconsole.log(result.data);   // { approved: true }\n```\n\n## API Operations\n\n### Tasks\n\n| Function | Description |\n|----------|-------------|\n| `createTask` | Create a new human task with steps and fields |\n| `getTask` | Get task status and completion data |\n| `listTasks` | List tasks with filters (status, assignee, search, etc.) |\n| `cancelTask` | Cancel a pending task |\n| `completeTask` | Complete a task programmatically with data |\n| `waitForTask` | Long-poll until task reaches a terminal state |\n| `notifyTaskAssignee` | Send a reminder notification to the assignee |\n| `listTaskTemplates` | List distinct template IDs used across tasks |\n\n### Task Links\n\n| Function | Description |\n|----------|-------------|\n| `createTaskLink` | Create a magic link for a task |\n| `listTaskLinks` | List all magic links for a task |\n| `deleteTaskLink` | Delete a magic link |\n\n### Processes\n\n| Function | Description |\n|----------|-------------|\n| `createProcess` | Create a tracked multi-step process |\n| `getProcess` | Get process state with timeline |\n| `listProcesses` | List processes with filters |\n| `updateProcess` | Push step transitions and progress updates |\n| `listProcessTemplates` | List distinct process template IDs |\n\n### Process Links\n\n| Function | Description |\n|----------|-------------|\n| `createProcessLink` | Create a magic link for a process |\n| `listProcessLinks` | List all magic links for a process |\n\n### Files\n\n| Function | Description |\n|----------|-------------|\n| `uploadFile` | Upload a file to storage |\n\n## Self-Hosted\n\n```typescript\nconst client = createHPIClient({\n  baseUrl: 'https://hpi.yourcompany.com',\n  token: 'htk_your-token',\n});\n```\n\n## License\n\n[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n","readmeFilename":"README.md"}