{"_id":"@botfather/units-agent-service","_rev":"2-a943921d3bc5cd953ba22efd12339be7","name":"@botfather/units-agent-service","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@botfather/units-agent-service","version":"0.1.1","license":"MIT","_id":"@botfather/units-agent-service@0.1.1","maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"homepage":"https://github.com/Botfather/units/tree/main/packages/units-agent-service","bugs":{"url":"https://github.com/Botfather/units/issues"},"dist":{"shasum":"89d1c4c9a77161a5964632d8b92a62af66d97d81","tarball":"https://registry.npmjs.org/@botfather/units-agent-service/-/units-agent-service-0.1.1.tgz","fileCount":5,"integrity":"sha512-JlzkcsZhUE6WMFBKGfWo+NYp0JPb+bEf10+adYELtL2gpM/WGtQ4TqCoM201PHiST7Iu4DXFLnqQe0yiZFiJxA==","signatures":[{"sig":"MEUCIQChb0ZTMPK6uM1qLfPTpRdHf4bTbXVSzohQn/JdyWjZKgIgD3vF4R4XE/mnBtMg8YeVBJ3XzH63EBRCuz1GEVIAjBw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@botfather%2funits-agent-service@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9745},"main":"./index.js","type":"module","_from":"file:botfather-units-agent-service-0.1.1.tgz","types":"./index.d.ts","_npmUser":{"name":"botfather","email":"mohan.tushar.11@gmail.com"},"_resolved":"/tmp/6c54c0ac9e2c781d6a7ba9ee4c9973eb/botfather-units-agent-service-0.1.1.tgz","_integrity":"sha512-JlzkcsZhUE6WMFBKGfWo+NYp0JPb+bEf10+adYELtL2gpM/WGtQ4TqCoM201PHiST7Iu4DXFLnqQe0yiZFiJxA==","repository":{"url":"git+https://github.com/Botfather/units.git","type":"git","directory":"packages/units-agent-service"},"_npmVersion":"11.17.0","description":"Node HTTP service wrapper for Units agent UI compression.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@botfather/units-agent-plugin":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/units-agent-service_0.1.1_1782196782184_0.4954210035533224","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@botfather/units-agent-service","version":"0.1.2","description":"Node HTTP service wrapper for Units agent UI compression.","license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-agent-service"},"homepage":"https://github.com/Botfather/units/tree/main/packages/units-agent-service","bugs":{"url":"https://github.com/Botfather/units/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@botfather/units-agent-plugin":"0.1.2"},"publishConfig":{"access":"public"},"_id":"@botfather/units-agent-service@0.1.2","_integrity":"sha512-M0NGgBMheIhmuqvb6PczgLYVSKhEJ5TXb6tSNsPI6EgmFIf1AAw+Z19uETwF8cFLZPdppKGRL1/0sfC3pcOA0A==","_resolved":"/tmp/0cd251fa109f3ea00cea058cbc4c09f1/botfather-units-agent-service-0.1.2.tgz","_from":"file:botfather-units-agent-service-0.1.2.tgz","_nodeVersion":"24.16.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-M0NGgBMheIhmuqvb6PczgLYVSKhEJ5TXb6tSNsPI6EgmFIf1AAw+Z19uETwF8cFLZPdppKGRL1/0sfC3pcOA0A==","shasum":"7808bc9cb8a93e0d42439d317f187a810ef5f889","tarball":"https://registry.npmjs.org/@botfather/units-agent-service/-/units-agent-service-0.1.2.tgz","fileCount":5,"unpackedSize":9745,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@botfather%2funits-agent-service@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGVFecgdNhgB4ozba7LDku4Uo2gUfH5FwrH+dw+znTzAAiEA1ZDGscKVrQx1BezKFaGwZzGZcVoF3YpmTzENJIexLVw="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ae56b54e-11bf-46c4-9c4a-dba28335729f"}},"directories":{},"maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/units-agent-service_0.1.2_1782219356647_0.05518333385222207"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T06:39:41.952Z","modified":"2026-06-23T12:55:57.111Z","0.1.1":"2026-06-23T06:39:42.308Z","0.1.2":"2026-06-23T12:55:56.769Z"},"bugs":{"url":"https://github.com/Botfather/units/issues"},"license":"MIT","homepage":"https://github.com/Botfather/units/tree/main/packages/units-agent-service","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-agent-service"},"description":"Node HTTP service wrapper for Units agent UI compression.","maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"readme":"# @botfather/units-agent-service\n\nHTTP service wrapper for agent-facing UI compression.\n\n## Install\n\n```sh\nnpm install @botfather/units-agent-service\n```\n\n## Quick start\n\n```js\nimport { startUnitsAgentService } from \"@botfather/units-agent-service\";\n\nconst service = await startUnitsAgentService({\n  host: \"127.0.0.1\",\n  port: 8787,\n  libraryDir: \".units/library\",\n});\n\nconsole.log(service.url); // http://127.0.0.1:8787\n```\n\n### Endpoints\n\n- `GET /healthz`\n- `POST /compress-ui`\n\nRequest payload for `POST /compress-ui`:\n\n```json\n{\n  \"tree\": { \"tagName\": \"div\", \"children\": [] },\n  \"sourceType\": \"dom\",\n  \"target\": \"planner\",\n  \"maxTokens\": 600\n}\n```\n\n`sourceType` supports `dom`, `a11y`, `ir`, `react`, and `slack`. For Slack Block Kit, send the message payload or `blocks` array as `tree` with `sourceType: \"slack\"` (aliases: `block-kit`, `blockkit`, `mrkdwn`).\n\nResponse payload includes:\n- `dsl`\n- `unitsAst`\n- `programId`\n- `tokenEstimate`\n- `rewrite` / `compile` diagnostics\n\n## Exports\n\n- `createUnitsAgentService(config)`\n- `createUnitsAgentHttpHandler(config)`\n- `startUnitsAgentService(config)`\n","readmeFilename":"README.md"}