{"_id":"@0xagentio/axl-local","name":"@0xagentio/axl-local","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@0xagentio/axl-local","version":"0.1.0","description":"Local process harness for Gensyn AXL nodes in tests and examples.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/0xagentio/agentio.git","directory":"packages/axl-local"},"keywords":["gensyn","axl","p2p","local-network","typescript"],"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"},"dependencies":{"@0xagentio/axl-client":"^0.1.0"},"gitHead":"db306fcf82f9b5f97ef9a8f4a37138411443431b","_id":"@0xagentio/axl-local@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-WBKnXD1qNrvyY355psSWVcVhZvzgk6x2aM9EMmchYgaAxCLC8qCR8gILzJUIcds92KNQPDPNFvk+3O+UeQSPiw==","shasum":"6b8dbd722b7a43cd1243f8da2d2912658210ec5b","tarball":"https://registry.npmjs.org/@0xagentio/axl-local/-/axl-local-0.1.0.tgz","fileCount":18,"unpackedSize":31621,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBrh/7Q824w0NmoTWwFx/EuRg33qPtwChP8EwP7ETJZaAiAvElCkTdazNUCuaYUHuwcEFJ0WElbQiTiQOzKC6AytMg=="}]},"_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-local_0.1.0_1777361027493_0.8475664360089563"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T07:23:47.364Z","0.1.0":"2026-04-28T07:23:47.644Z","modified":"2026-04-28T07:23:47.815Z"},"maintainers":[{"name":"trivo","email":"florian@technotro.com"}],"description":"Local process harness for Gensyn AXL nodes in tests and examples.","homepage":"https://github.com/0xagentio/agentio#readme","keywords":["gensyn","axl","p2p","local-network","typescript"],"repository":{"type":"git","url":"git+https://github.com/0xagentio/agentio.git","directory":"packages/axl-local"},"bugs":{"url":"https://github.com/0xagentio/agentio/issues"},"license":"MIT","readme":"# @0xagentio/axl-local\n\nLocal process harness for Gensyn AXL nodes.\n\nThis package is for development, tests, and examples. It generates AXL node\nconfig files, creates local ed25519 private keys, starts AXL node processes, waits\nfor readiness, and returns TypeScript clients from `@0xagentio/axl-client`.\n\n## Install\n\n```bash\nnpm install @0xagentio/axl-local @0xagentio/axl-client\n```\n\nYou also need a compiled AXL `node` binary from the Gensyn AXL repository.\n\n## AXL node binary requirement\n\nThis package does not reimplement AXL in TypeScript. It manages the real Go AXL\nnode process for you. Build the AXL node binary first:\n\n```bash\ngit clone https://github.com/gensyn-ai/axl\ncd axl\nmake build\n```\n\nThen point this package at the compiled binary, either through an environment\nvariable used by examples/tests:\n\n```bash\nAGENTIO_AXL_NODE_BINARY=/path/to/axl/node\n```\n\nor directly in TypeScript:\n\n```ts\nconst node = await startLocalAxlNode({\n  name: 'alice',\n  binaryPath: '/path/to/axl/node',\n  workingDirectory: '.agentio/axl/alice',\n  apiPort: 9101,\n});\n```\n\n\n## Single node\n\n```ts\nimport { startLocalAxlNode } from '@0xagentio/axl-local';\n\nconst node = await startLocalAxlNode({\n  name: 'alice',\n  binaryPath: './vendor/axl/node',\n  workingDirectory: '.agentio/axl/alice',\n  apiPort: 9101,\n  listen: ['tls://127.0.0.1:9201'],\n});\n\nconsole.log(node.peerId);\nconsole.log(node.baseUrl);\n\nawait node.stop();\n```\n\n## Multi-node network\n\n```ts\nimport { startLocalAxlNetwork } from '@0xagentio/axl-local';\n\nconst network = await startLocalAxlNetwork({\n  binaryPath: './vendor/axl/node',\n  workingDirectory: '.agentio/axl',\n  nodes: [\n    {\n      name: 'alice',\n      apiPort: 9101,\n      listen: ['tls://127.0.0.1:9201'],\n    },\n    {\n      name: 'bob',\n      apiPort: 9102,\n      peers: ['tls://127.0.0.1:9201'],\n    },\n  ],\n});\n\nconst alice = network.node('alice');\nconst bob = network.node('bob');\n\nawait alice.client.send({\n  peerId: bob.peerId,\n  body: new TextEncoder().encode('hello bob'),\n});\n\nawait network.stop();\n```\n\n## Config-only preparation\n\nUse `prepareLocalAxlNode` when you want to inspect generated files before\nstarting a process.\n\n```ts\nconst prepared = await prepareLocalAxlNode({\n  name: 'alice',\n  binaryPath: './vendor/axl/node',\n  workingDirectory: '.agentio/axl/alice',\n  apiPort: 9101,\n});\n\nconsole.log(prepared.configPath);\nconsole.log(prepared.privateKeyPath);\n```\n\n## Test strategy\n\nNormal package tests do not require the AXL binary. Real process tests should be\ngated with an explicit binary path so CI and contributors do not accidentally\nstart network processes.\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-1b5766d7ea970072a0d282fea8f8616e"}