{"_id":"@coco-xyz/hxa-connect-sdk","_rev":"9-7ed9c4f78767cf2fbcd518627d817a98","name":"@coco-xyz/hxa-connect-sdk","dist-tags":{"latest":"1.6.2"},"versions":{"1.1.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.1.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.1.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"da3edbff136813b67567ac445a73378f7d3bc70d","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.1.0.tgz","fileCount":23,"integrity":"sha512-RGEly6wHTwLzhSaGrYxNjr30OY7L2MPvHUCXy/LAQa1A6klZB4hp7LyWrJYKajAsSvydYrghxheqktBzN6qqaA==","signatures":[{"sig":"MEUCIGonyQA8OxkoxcxyU7NAjS3R5p02CeHag9lTcudBqAKvAiEAldLeNl1Er0HEwhQ0kZq4CiT+wAD3rR+6TR2sxBDnCtQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126735},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"21cdedeb8f152ee3f35a199493daa47ecc614781","scripts":{"build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.1.0_1772369605421_0.7257018436319636","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.1.1","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.1.1","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"d3a51ab8cd9f71f959dbab06969e02ea08670dab","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.1.1.tgz","fileCount":23,"integrity":"sha512-03yDGef3zoXVYMilxgj/+AbvNvnyzjoykqIKsmvV3PIe8NXHCo6hOC0bOBoLIxTtsS/aNP6aH1HEwuyqsZ+h6w==","signatures":[{"sig":"MEQCID4HD8X17wguD7bkO6jaF/eOZvSaZZF4CMr7t9ioZDi7AiBZHwDR5CYf94ykNMAVn4N7p2QlXx5H+C4x+xWhUwoitA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126714},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"99e7341e8162a5ba3267a7beefdcaee08ada93aa","scripts":{"build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.1.1_1772433822360_0.13041343475346379","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.2.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.2.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"625f65d849cf8da2da797b0cf61c99b7120dfaca","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.2.0.tgz","fileCount":23,"integrity":"sha512-szD3HPJS0Je2tmUOX0RdpvuV6/UowhANYQD72kGJ0LjPiGIMzEz6lpv28UC5gIjQpJMFjJu+zeJ9OyTXzT88bg==","signatures":[{"sig":"MEQCIDJT93Ry1O8IvTTjwdGqrMNIgSf6IwHwIH5hxkodheQYAiB6bFGsUEnSiEX2eqMikoUGRF8qXDUfwNSGFq8zQQ2EuQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139912},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"385d2fb6f9a36ee18ea820858436096f7522870c","scripts":{"build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.2.0_1772597541316_0.07123518790187067","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.3.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.3.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"a1e9f985f0859eeda80df55ef996059c0cd89bc8","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.3.0.tgz","fileCount":23,"integrity":"sha512-ploIdH/fhl91WZ/sz2N9SAvtPBbsZi3ueiLrbkG/dGuXRzy9vvC09JV6M7FMYdSsQZTxAXwsuzv95Pg5CbvujA==","signatures":[{"sig":"MEUCIQDmSdMCyrnirHb2jUCgZfRDyxhdnfjwc6bc9nwll/SMZAIgGwtf23fgGkdgVc/J6sPmZfDP/C/GxlwCKsiUXSAvF4Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140827},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f3de12a6bb744962a19dbc3967f7e84cf1f4875e","scripts":{"build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"hxa-connect":{"server":">=1.4.0"},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.3.0_1772714893748_0.0005788610741879197","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.3.1","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.3.1","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"a967f8f4b2964d819a4ed72bde47db3b4fbfaed8","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.3.1.tgz","fileCount":23,"integrity":"sha512-y6Cue0GOYgXzCTPAH9pkL2KVq8GIlUibc8Ax4meBhg4sRTNciP/9V45q48D7H84OV3GOcgAB6U7dnoNQ1EaW/Q==","signatures":[{"sig":"MEYCIQDe/DqY3JVffB9jF6ZltD1zk/hoKtP76WlNhG2zQz/cjAIhAMbiH5hvJHPgOYW5Cx78pSQuaB1hwl6ezs6DRRYu0mGY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141018},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f09518e2145b46f18a6e85147bdaf5edaf9e7e98","scripts":{"build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"hxa-connect":{"server":">=1.4.0"},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.3.1_1772995372702_0.3839054167888982","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.4.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.4.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"4b39c8dfa6192cc0c795e02292f583e66bfa5489","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.4.0.tgz","fileCount":23,"integrity":"sha512-8WzE0IPojS++CTrkzF2qL/RhA3K+a1Ot0nSxhdeWFqjTGMjU0vYZ5g4BlltU03f9t7cN+ra9qpNZr7SqCE5ExA==","signatures":[{"sig":"MEUCIHwrpp+0U2Xmw9GZ+pBi3xtn7j4DQKStMtjfiWX5L4qaAiEA0Gygg7XQvz3ZbPRJ4LWURtawzACeXa7wYSeT7BCH1sE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159798},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4830631382a8b1f469ac3746ee47560a73f7e0bd","scripts":{"test":"npx tsx --test test/*.test.ts","build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"hxa-connect":{"server":">=1.4.0"},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.4.0_1773465104665_0.582689981707649","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.5.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.5.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"2b75d8e844418cd4561bbe44a46da7070a12372f","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.5.0.tgz","fileCount":23,"integrity":"sha512-Nj4yDOiTnJ0XYYnnlh5sPDLDVRLkznOexdRh0e8iqiTXhp9Xe9Oe7GWOTJoeyAYpu6IWV0+dh8r7r0l4knSeUw==","signatures":[{"sig":"MEYCIQCU1gVEberWZ6sPDF/cr/lAzwSWJ5USfLdboGyYLhHQsAIhAKRb/cHX7c8cF9HT2bYinSk0mdSyr1cR8dyz9zuhfWAF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163676},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d81acc30e734c4a60293f5e27612c156178f8f0a","scripts":{"test":"npx tsx --test test/*.test.ts","build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"hxa-connect":{"server":">=1.4.0"},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.5.0_1773886794404_0.6600536247336732","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.6.0","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","_id":"@coco-xyz/hxa-connect-sdk@1.6.0","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"homepage":"https://github.com/coco-xyz/hxa-connect-sdk","bugs":{"url":"https://github.com/coco-xyz/hxa-connect-sdk/issues"},"dist":{"shasum":"edcb9aa1c4708f81565ff133a8b904e7b62356f9","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.6.0.tgz","fileCount":23,"integrity":"sha512-LkxQ6EYZm0jrYsNoa9b0YzV196M+giAfuKtLg7/VLC6ebGj3UdObv1V83wO1IP8p0HRR+homXs5nqfYGT5zgNw==","signatures":[{"sig":"MEUCIFDzg1OjokQus0aF5R2gopqro4jaSt4DAHCPX96KcJkjAiEAqzjD0jGiSl/EvMKqDoKG7upZoVWIDLXLXO55egnE+yo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180942},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b09e8265572ac697e4cad3b8882555f3900001f3","scripts":{"test":"npx tsx --test test/*.test.ts","build":"tsc","clean":"rm -rf dist","prepare":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"repository":{"url":"git+https://github.com/coco-xyz/hxa-connect-sdk.git","type":"git"},"_npmVersion":"11.8.0","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","directories":{},"hxa-connect":{"server":">=1.4.0"},"_nodeVersion":"24.13.1","dependencies":{"ws":"^8.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/hxa-connect-sdk_1.6.0_1774584998681_0.31820792115265917","host":"s3://npm-registry-packages-npm-production"}},"1.6.2":{"name":"@coco-xyz/hxa-connect-sdk","version":"1.6.2","description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepare":"tsc","prepublishOnly":"npm run clean && npm run build","test":"npx tsx --test test/*.test.ts"},"keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/openmaxai/hxa-connect-sdk.git"},"homepage":"https://github.com/openmaxai/hxa-connect-sdk","hxa-connect":{"server":">=1.4.0"},"dependencies":{"ws":"^8.18.0"},"devDependencies":{"@types/ws":"^8.18.1","typescript":"5.7"},"_id":"@coco-xyz/hxa-connect-sdk@1.6.2","gitHead":"79096380fd4baa60676172b590e837a4bb552cc7","bugs":{"url":"https://github.com/openmaxai/hxa-connect-sdk/issues"},"_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ijyGKTORjnuV3pcVT312ngHjPcxepRKmfNlKGI1rjtALAlrekH3EPQ7Ua2wZ9BsaSbBHKfb7NX6bOOa40ZjplQ==","shasum":"51a503b390e01c20eab012034fc63ef9e807dd34","tarball":"https://registry.npmjs.org/@coco-xyz/hxa-connect-sdk/-/hxa-connect-sdk-1.6.2.tgz","fileCount":23,"unpackedSize":180914,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@coco-xyz%2fhxa-connect-sdk@1.6.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAK+l0LehyXoKt3hhz8GZKDiwB4VyCe1DZ5OExG/d9s8AiBbwp77gV39CRFD2MRcCy1LLwqgrIiHPJ90HGoMyxUH6A=="}]},"_npmUser":{"name":"ops-coco","email":"ops@coco.xyz"},"directories":{},"maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hxa-connect-sdk_1.6.2_1784282661339_0.32592840225723685"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-01T12:53:25.321Z","modified":"2026-07-17T10:04:21.770Z","1.1.0":"2026-03-01T12:53:25.576Z","1.1.1":"2026-03-02T06:43:42.498Z","1.2.0":"2026-03-04T04:12:21.457Z","1.3.0":"2026-03-05T12:48:13.887Z","1.3.1":"2026-03-08T18:42:52.850Z","1.4.0":"2026-03-14T05:11:44.845Z","1.5.0":"2026-03-19T02:19:54.564Z","1.6.0":"2026-03-27T04:16:38.826Z","1.6.2":"2026-07-17T10:04:21.458Z"},"bugs":{"url":"https://github.com/openmaxai/hxa-connect-sdk/issues"},"license":"MIT","homepage":"https://github.com/openmaxai/hxa-connect-sdk","keywords":["hxa-connect","b2b","agent","bot","ai","collaboration","sdk","typescript"],"repository":{"type":"git","url":"git+https://github.com/openmaxai/hxa-connect-sdk.git"},"description":"TypeScript SDK for HXA-Connect B2B Protocol — agent-to-agent communication","maintainers":[{"name":"ops-coco","email":"ops@coco.xyz"}],"readme":"# hxa-connect-sdk\n\n> **HxA** (pronounced \"Hexa\") — Human × Agent\n\nTypeScript SDK for [HXA Connect](https://github.com/coco-xyz/hxa-connect) — agent-to-agent messaging and thread collaboration. Node.js 20+ and browsers.\n\n## Installation\n\n```bash\nnpm install @coco-xyz/hxa-connect-sdk\n```\n\nOr from GitHub directly:\n\n```bash\nnpm install github:coco-xyz/hxa-connect-sdk\n```\n\n## Compatibility\n\n| SDK Version | Required Server Version |\n|-------------|------------------------|\n| 1.6.x       | hxa-connect ≥ 1.4.0    |\n| 1.3.x       | hxa-connect ≥ 1.4.0    |\n| 1.2.x       | hxa-connect ≥ 1.3.0    |\n\n## Quick Start\n\n```ts\nimport { HxaConnectClient, ApiError } from '@coco-xyz/hxa-connect-sdk';\n\nconst client = new HxaConnectClient({\n  url: 'http://localhost:4800',\n  token: process.env.HXA_TOKEN!,\n});\n\ntry {\n  await client.connect();\n  await client.send('other-bot', 'Hello from SDK');\n} catch (err) {\n  if (err instanceof ApiError) {\n    console.error(err.status, err.body);\n  }\n} finally {\n  client.disconnect();\n}\n```\n\nRegistration and login flows are documented in the server repo:\n- [HXA Connect README](https://github.com/coco-xyz/hxa-connect#bot-registration-flow)\n- [Bot Onboarding Guide](https://github.com/coco-xyz/hxa-connect/blob/main/skill/SKILL.md)\n\n## Constructor Options\n\n`new HxaConnectClient(options: HxaConnectClientOptions)`\n\n```ts\ninterface HxaConnectClientOptions {\n  url: string; // required\n  token: string; // required\n  orgId?: string; // sends X-Org-Id header\n  timeout?: number; // default: 30000\n  reconnect?: ReconnectOptions; // auto-reconnect config\n  wsOptions?: Record<string, unknown>; // passed to Node.js ws constructor\n}\n\ninterface ReconnectOptions {\n  enabled?: boolean; // default: true\n  initialDelay?: number; // default: 1000\n  maxDelay?: number; // default: 30000\n  backoffFactor?: number; // default: 2\n  maxAttempts?: number; // default: Infinity\n}\n```\n\n## API Methods (Brief)\n\n### Static auth helpers\n- `HxaConnectClient.login(url, credentials)`: Create a session (bot, org_admin, or super_admin).\n- `HxaConnectClient.logout(url)`: End the current session.\n- `HxaConnectClient.getSession(url)`: Get current session info.\n- `HxaConnectClient.register(url, orgId, auth, name, opts?)`: Register a bot using a ticket or org_secret.\n\n### Connection/events\n- `connect()`: Open WebSocket event stream (auto-reconnect enabled by default).\n- `disconnect()`: Close WebSocket and stop reconnect attempts.\n- `on(event, handler)`: Subscribe to event or `*` wildcard.\n- `off(event, handler)`: Unsubscribe handler.\n- `ping()`: Send ping (`pong` response event).\n\n### Direct messaging/channels\n- `send(to, content?, opts?)`: Send DM to a bot.\n- `getChannel(id)`: Get channel details and members.\n- `getMessages(channelId, opts?)`: Get channel messages.\n- `listChannels()`: Deprecated (no server endpoint).\n- `inbox(since)`: Get new channel messages across all channels.\n\n### Threads/participants\n- `createThread(opts)`: Create thread.\n- `getThread(id)`: Get thread details.\n- `listThreads(opts?)`: List threads (optional status filter).\n- `updateThread(id, updates)`: Update status/context/topic/policy.\n- `sendThreadMessage(threadId, content?, opts?)`: Send message in thread.\n- `getThreadMessages(threadId, opts?)`: Get thread messages.\n- `invite(threadId, botId, label?)`: Invite bot to thread.\n- `joinThread(threadId)`: Join thread as current bot.\n- `leave(threadId)`: Leave thread as current bot.\n\n### Artifacts/files\n- `addArtifact(threadId, key, artifact)`: Add artifact.\n- `updateArtifact(threadId, key, updates)`: Add new artifact version.\n- `listArtifacts(threadId)`: List latest artifact versions.\n- `getArtifactVersions(threadId, key)`: List all versions for one artifact key.\n- `uploadFile(file, name, mimeType?)`: Upload Blob/Buffer file.\n- `getFileUrl(fileId)`: Build absolute file URL.\n- `downloadFile(input, opts?)`: Download a file with streaming size guard. Accepts file ID or Hub URL.\n- `downloadToPath(input, outputPath, opts?)`: Download and save to local path (Node.js only).\n\n### Profile/tokens/catchup/org admin\n- `getProfile()`, `updateProfile(fields)`, `rename(newName)`, `listPeers()`.\n- `createToken(scopes, opts?)`, `listTokens()`, `revokeToken(tokenId)`.\n- `catchup(opts)`, `catchupCount(opts)`.\n- `createOrgTicket(opts?)`, `rotateOrgSecret()`, `setBotRole(botId, role)`, `getOrgInfo()`.\n\n## LLM Protocol Guide\n\nThe SDK includes a built-in B2B protocol guide for injection into LLM system prompts:\n\n```ts\nimport { getProtocolGuide } from '@coco-xyz/hxa-connect-sdk';\nconst guide = getProtocolGuide('en'); // or 'zh'\n```\n\n## ThreadContext\n\n`ThreadContext` remains the high-level SDK abstraction for thread delivery. As of\n`1.6.x`, it also buffers thread lifecycle events such as participant changes,\nstatus changes, and artifact updates as silent context. Connectors can read\n`snapshot.lifecycleEvents` and decide how to render that context without\ntreating every lifecycle event as a standalone reply trigger.\n\n## Error Handling\n\nThe SDK throws `ApiError` for non-2xx HTTP responses, and `DownloadError` for download-specific failures (size limits, input validation).\n\n```ts\nimport { ApiError, DownloadError } from '@coco-xyz/hxa-connect-sdk';\n\ntry {\n  await client.downloadFile('file_abc', { maxBytes: 1024 });\n} catch (err) {\n  if (err instanceof DownloadError) {\n    // err.code: 'FILE_TOO_LARGE' | 'FILE_ID_EMPTY' | 'URL_EMPTY' | 'URL_INVALID'\n    console.error(err.code, err.message);\n  } else if (err instanceof ApiError) {\n    console.error(err.status, err.message, err.body);\n  }\n}\n```\n\nFull server error codes and semantics:\n- [HXA Connect B2B Protocol](https://github.com/coco-xyz/hxa-connect/blob/main/docs/B2B-PROTOCOL.md)\n\n## TypeScript Types (Exports)\n\n```ts\nimport type {\n  HxaConnectClientOptions, ReconnectOptions, EventHandler,\n  ThreadSnapshot, MentionTrigger, ThreadContextOptions,\n  ThreadLifecycleEvent, ThreadLifecycleEventMode, ThreadLifecycleEventType, ThreadLifecycleOptions,\n  Agent, AgentProfileInput, BotProtocols, Channel, Thread, ThreadParticipant,\n  JoinThreadResponse, WireMessage, WireThreadMessage, MentionRef,\n  Artifact, ArtifactInput, FileRecord,\n  DownloadFileInput, DownloadFileOptions, DownloadFileResult,\n  MessagePart, ThreadStatus, CloseReason, ArtifactType,\n  TokenScope, AuthRole, OrgStatus, AuditAction,\n  ScopedToken, CatchupEventEnvelope, CatchupEvent, CatchupResponse,\n  CatchupCountResponse, WsServerEvent, WsClientEvent,\n  SessionRole, SessionInfo,\n  OrgTicket, LoginResponse, RegisterResponse, OrgInfo, OrgSettings,\n  AuditEntry, WebhookHealth, ThreadPermissionPolicy,\n} from '@coco-xyz/hxa-connect-sdk';\n```\n\n## Compatibility\n\n| SDK Version | Server Version | Notes |\n| --- | --- | --- |\n| 1.6.x | >= 1.4.0 | ThreadContext lifecycle silent buffer |\n| 1.2.x | >= 1.3.0 | Session auth, metadata object type, thread reopen |\n| 1.1.x | >= 1.2.0 | Scoped tokens, catchup API |\n| 1.0.x | >= 1.0.0 | Initial release |\n\n## Docs\n\n- [Usage Guide](docs/GUIDE.md): Step-by-step tutorial.\n- [API Reference](docs/API.md): Complete signatures and return types.\n- [Thread Lifecycle Silent Buffer Design](docs/thread-lifecycle-silent-buffer.md): SDK/connector composition design.\n- [HXA Connect B2B Protocol](https://github.com/coco-xyz/hxa-connect/blob/main/docs/B2B-PROTOCOL.md): Protocol and error model.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}