{"_id":"@0xagentio/axl-client","name":"@0xagentio/axl-client","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@0xagentio/axl-client","version":"0.1.0","description":"Small TypeScript client for the Gensyn AXL node HTTP bridge.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/0xagentio/agentio.git","directory":"packages/axl-client"},"keywords":["gensyn","axl","p2p","typescript","client"],"sideEffects":false,"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -b","typecheck":"tsc -b --pretty false","prepack":"npm run build"},"gitHead":"db306fcf82f9b5f97ef9a8f4a37138411443431b","_id":"@0xagentio/axl-client@0.1.0","bugs":{"url":"https://github.com/0xagentio/agentio/issues"},"homepage":"https://github.com/0xagentio/agentio#readme","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-tHk/bkrwug48Y7uo0kRKelT3WxIB5Ib7STLVO4QeA902oAMQ+sNmCy1Jwg8wf38QZli/OSf3cwBBdhRM8s231w==","shasum":"b0f0d782964a759b36ac529337a8c7ae7eaaa50a","tarball":"https://registry.npmjs.org/@0xagentio/axl-client/-/axl-client-0.1.0.tgz","fileCount":10,"unpackedSize":16419,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEUTu/ZmUUobRfFm2vKryEc1mscEvcFLfbeuSoZfLMBEAiBoIIqDETtVEz6qxATr+BS9r5D5AKW8G4ek9wGPvzjxeQ=="}]},"_npmUser":{"name":"trivo","email":"florian@technotro.com"},"directories":{},"maintainers":[{"name":"trivo","email":"florian@technotro.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/axl-client_0.1.0_1777361006166_0.7898068294573286"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T07:23:26.061Z","0.1.0":"2026-04-28T07:23:26.431Z","modified":"2026-04-28T07:23:26.693Z"},"maintainers":[{"name":"trivo","email":"florian@technotro.com"}],"description":"Small TypeScript client for the Gensyn AXL node HTTP bridge.","homepage":"https://github.com/0xagentio/agentio#readme","keywords":["gensyn","axl","p2p","typescript","client"],"repository":{"type":"git","url":"git+https://github.com/0xagentio/agentio.git","directory":"packages/axl-client"},"bugs":{"url":"https://github.com/0xagentio/agentio/issues"},"license":"MIT","readme":"# @0xagentio/axl-client\n\nSmall TypeScript client for the Gensyn AXL node HTTP bridge.\n\nAXL is a Go node that exposes a local HTTP API. This package does not run the\nnode. It talks to one already-running node and gives TypeScript applications a\nminimal API for topology inspection, sending binary messages, and polling\nreceived binary messages.\n\n## Install\n\n```bash\nnpm install @0xagentio/axl-client\n```\n\n## Usage\n\n```ts\nimport { createAxlClient } from '@0xagentio/axl-client';\n\nconst axl = createAxlClient({\n  baseUrl: 'http://127.0.0.1:9002',\n});\n\nconst topology = await axl.getTopology();\nconsole.log(topology.ourPublicKey);\n\nawait axl.send({\n  peerId: 'remote-ed25519-public-key-hex',\n  body: new TextEncoder().encode('hello from TypeScript'),\n});\n\nconst incoming = await axl.recv();\nif (incoming !== undefined) {\n  console.log(incoming.fromPeerId);\n  console.log(new TextDecoder().decode(incoming.body));\n}\n```\n\n## API\n\n### `createAxlClient(options)`\n\nCreates a client for one AXL HTTP bridge.\n\n```ts\nconst client = createAxlClient({\n  baseUrl: 'http://127.0.0.1:9002',\n});\n```\n\nOptions:\n\n- `baseUrl`: base URL of the AXL node HTTP bridge.\n- `fetch`: optional custom fetch implementation for tests or non-standard runtimes.\n\n### `client.getTopology()`\n\nCalls AXL `GET /topology` and returns normalized topology fields plus the raw\nresponse.\n\n### `client.send({ peerId, body })`\n\nCalls AXL `POST /send` with `X-Destination-Peer-Id` and a binary body.\n\n### `client.recv()`\n\nCalls AXL `GET /recv`.\n\nReturns `undefined` when AXL responds with `204 No Content`, otherwise returns\nthe sender peer id and binary body.\n\n## Design boundary\n\nThis client intentionally only moves bytes through AXL. It does not interpret\nagent messages, proofs, policies, reasoning results, or application-specific\npayloads. Higher-level frameworks should encode those concepts before calling\n`send` and decode them after `recv`.\n\n## AXL receive identity note\n\nFor raw `/recv` messages, AXL returns `X-From-Peer-Id` as transport metadata\nderived from the remote network address. Treat it as the source id reported by\nthe transport, not as a guaranteed application-level identity. If your protocol\nneeds stable agent identity, include and verify that identity inside the message\npayload.\n","readmeFilename":"README.md","_rev":"1-06f1d95b1e0000f714cce3ac154dfa72"}