{"_id":"@aigentic/agentic-robotics","_rev":"2-8751996ed71dccacf6e60e50b65bc665","name":"@aigentic/agentic-robotics","dist-tags":{"alpha":"0.1.3","latest":"0.1.3"},"versions":{"0.1.3":{"name":"@aigentic/agentic-robotics","version":"0.1.3","keywords":["robotics","ros","ros2","middleware","agents","napi-rs","rust","native"],"license":"MIT OR Apache-2.0","_id":"@aigentic/agentic-robotics@0.1.3","maintainers":[{"name":"aigentic","email":"engineering@aigentic.net"}],"homepage":"https://ruv.io","bugs":{"url":"https://github.com/ruvnet/vibecast/issues"},"dist":{"shasum":"4e61ba1debfc3ee50d118bc620b49a7c257adca5","tarball":"https://registry.npmjs.org/@aigentic/agentic-robotics/-/agentic-robotics-0.1.3.tgz","fileCount":2,"integrity":"sha512-iau5xZv9UL39BhNpsPWsPhO85sQaKinH2ONTP9uafhcr5kpLvluY4b4rWl2CMmsU33l2NqphhPEcr29utVHQAw==","signatures":[{"sig":"MEUCIBYJjjBEiy5DUc4l2KZvpI7ZqrHP/iA2vRefAzm21oeiAiEAsM+GU37ZBh7AbyekdvQzuhwn8Os8gGqs6/1KODM5b6U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8952},"main":"index.js","napi":{"name":"agentic-robotics-node","triples":{"defaults":true,"additional":["x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-apple-darwin","aarch64-apple-darwin"]}},"types":"index.d.ts","engines":{"node":">= 14"},"gitHead":"e2cb6210ce8d478b39cad81872a4aef78a05ceb4","scripts":{"test":"node test.js","build":"cargo build --release"},"_npmUser":{"name":"aigentic","email":"engineering@aigentic.net"},"repository":{"url":"git+https://github.com/ruvnet/vibecast.git","type":"git","directory":"crates/agentic-robotics-node"},"_npmVersion":"11.12.0","description":"High-performance agentic robotics framework with ROS2 compatibility - Node.js bindings","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agentic-robotics_0.1.3_1779323936916_0.9312318680820961","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-21T00:38:56.770Z","modified":"2026-09-13T15:30:23.974Z","0.1.3":"2026-05-21T00:38:57.080Z"},"bugs":{"url":"https://github.com/ruvnet/vibecast/issues"},"license":"MIT OR Apache-2.0","homepage":"https://ruv.io","keywords":["robotics","ros","ros2","middleware","agents","napi-rs","rust","native"],"repository":{"url":"git+https://github.com/ruvnet/vibecast.git","type":"git","directory":"crates/agentic-robotics-node"},"description":"High-performance agentic robotics framework with ROS2 compatibility - Node.js bindings","maintainers":[{"email":"engineering@aigentic.net","name":"aiggy"}],"readme":"# agentic-robotics-node\n\n[![Crates.io](https://img.shields.io/crates/v/agentic-robotics-node.svg)](https://crates.io/crates/agentic-robotics-node)\n[![Documentation](https://docs.rs/agentic-robotics-node/badge.svg)](https://docs.rs/agentic-robotics-node)\n[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](../../LICENSE)\n[![npm](https://img.shields.io/npm/v/agentic-robotics)](https://www.npmjs.com/package/agentic-robotics)\n\n**Node.js/TypeScript bindings for Agentic Robotics**\n\nPart of the [Agentic Robotics](https://github.com/ruvnet/vibecast) framework - high-performance robotics middleware with ROS2 compatibility.\n\n## Features\n\n- 🌐 **TypeScript Support**: Full type definitions included\n- ⚡ **Native Performance**: Rust-powered via NAPI\n- 🔄 **Async/Await**: Modern JavaScript async patterns\n- 📡 **Pub/Sub**: ROS2-compatible topic messaging\n- 🎯 **Type-Safe**: Compile-time type checking in TypeScript\n- 🚀 **High Performance**: 540ns serialization, 30ns messaging\n\n## Installation\n\n```bash\nnpm install agentic-robotics\n# or\nyarn add agentic-robotics\n# or\npnpm add agentic-robotics\n```\n\n## Quick Start\n\n### TypeScript\n\n```typescript\nimport { Node, Publisher, Subscriber } from 'agentic-robotics';\n\n// Create a node\nconst node = new Node('robot_node');\n\n// Create publisher\nconst pubStatus = node.createPublisher<string>('/status');\n\n// Create subscriber\nconst subCommands = node.createSubscriber<string>('/commands');\n\n// Publish messages\npubStatus.publish('Robot initialized');\n\n// Subscribe to messages\nsubCommands.onMessage((msg) => {\n    console.log('Received command:', msg);\n});\n```\n\n### JavaScript\n\n```javascript\nconst { Node } = require('agentic-robotics');\n\nconst node = new Node('robot_node');\n\nconst pubStatus = node.createPublisher('/status');\npubStatus.publish('Robot active');\n\nconst subSensor = node.createSubscriber('/sensor');\nsubSensor.onMessage((data) => {\n    console.log('Sensor data:', data);\n});\n```\n\n## Examples\n\n### Autonomous Navigator\n\n```typescript\nimport { Node } from 'agentic-robotics';\n\ninterface Pose {\n    x: number;\n    y: number;\n    theta: number;\n}\n\ninterface Velocity {\n    linear: number;\n    angular: number;\n}\n\nconst node = new Node('navigator');\n\n// Subscribe to current pose\nconst subPose = node.createSubscriber<Pose>('/robot/pose');\n\n// Publish velocity commands\nconst pubCmd = node.createPublisher<Velocity>('/cmd_vel');\n\n// Navigation logic\nsubPose.onMessage((pose) => {\n    const target = { x: 10, y: 10 };\n    const cmd = computeVelocity(pose, target);\n    pubCmd.publish(cmd);\n});\n\nfunction computeVelocity(current: Pose, target: { x: number; y: number }): Velocity {\n    const dx = target.x - current.x;\n    const dy = target.y - current.y;\n    const distance = Math.sqrt(dx * dx + dy * dy);\n    const targetAngle = Math.atan2(dy, dx);\n    const angleError = targetAngle - current.theta;\n\n    return {\n        linear: Math.min(distance * 0.5, 1.0),\n        angular: angleError * 2.0,\n    };\n}\n```\n\n### Vision Processing\n\n```typescript\nimport { Node } from 'agentic-robotics';\n\ninterface Image {\n    width: number;\n    height: number;\n    data: Uint8Array;\n}\n\ninterface Detection {\n    label: string;\n    confidence: number;\n    bbox: { x: number; y: number; w: number; h: number };\n}\n\nconst node = new Node('vision_node');\n\nconst subImage = node.createSubscriber<Image>('/camera/image');\nconst pubDetections = node.createPublisher<Detection[]>('/detections');\n\nsubImage.onMessage(async (image) => {\n    const detections = await detectObjects(image);\n    pubDetections.publish(detections);\n});\n\nasync function detectObjects(image: Image): Promise<Detection[]> {\n    // Your ML inference here\n    return [\n        { label: 'person', confidence: 0.95, bbox: { x: 100, y: 100, w: 50, h: 100 } },\n    ];\n}\n```\n\n### Multi-Robot Coordination\n\n```typescript\nimport { Node } from 'agentic-robotics';\n\nclass RobotAgent {\n    private node: Node;\n    private id: string;\n\n    constructor(id: string) {\n        this.id = id;\n        this.node = new Node(`robot_${id}`);\n\n        // Subscribe to team status\n        const subTeam = this.node.createSubscriber<TeamStatus>('/team/status');\n        subTeam.onMessage((status) => this.onTeamUpdate(status));\n\n        // Publish own status\n        const pubStatus = this.node.createPublisher<RobotStatus>(`/robot/${id}/status`);\n        setInterval(() => {\n            pubStatus.publish({\n                id: this.id,\n                position: this.getPosition(),\n                battery: this.getBatteryLevel(),\n            });\n        }, 100);\n    }\n\n    private onTeamUpdate(status: TeamStatus) {\n        console.log(`Robot ${this.id} received team update:`, status);\n        // Coordinate with other robots\n    }\n\n    private getPosition() {\n        return { x: 0, y: 0, z: 0 };\n    }\n\n    private getBatteryLevel() {\n        return 95;\n    }\n}\n\n// Create robot swarm\nconst robots = [\n    new RobotAgent('scout_1'),\n    new RobotAgent('scout_2'),\n    new RobotAgent('worker_1'),\n];\n```\n\n## API Reference\n\n### Node\n\n```typescript\nclass Node {\n    constructor(name: string);\n\n    createPublisher<T>(topic: string): Publisher<T>;\n    createSubscriber<T>(topic: string): Subscriber<T>;\n\n    shutdown(): void;\n}\n```\n\n### Publisher\n\n```typescript\nclass Publisher<T> {\n    publish(message: T): Promise<void>;\n    getTopic(): string;\n}\n```\n\n### Subscriber\n\n```typescript\nclass Subscriber<T> {\n    onMessage(callback: (message: T) => void): void;\n    getTopic(): string;\n}\n```\n\n## Performance\n\nThe Node.js bindings maintain near-native performance:\n\n| Operation | Node.js | Rust Native | Overhead |\n|-----------|---------|-------------|----------|\n| **Publish** | 850 ns | 540 ns | 57% |\n| **Subscribe** | 120 ns | 30 ns | 4x |\n| **Serialization** | 1.2 µs | 540 ns | 2.2x |\n\nStill significantly faster than traditional ROS2 Node.js bindings!\n\n## Building from Source\n\n```bash\n# Clone repository\ngit clone https://github.com/ruvnet/vibecast\ncd vibecast\n\n# Build Node.js addon\nnpm install\nnpm run build:node\n\n# Run tests\nnpm test\n```\n\n## TypeScript Configuration\n\n```json\n{\n    \"compilerOptions\": {\n        \"target\": \"ES2020\",\n        \"module\": \"commonjs\",\n        \"strict\": true,\n        \"esModuleInterop\": true\n    }\n}\n```\n\n## Examples\n\nSee the [examples directory](../../examples) for complete working examples:\n\n- `01-hello-robot.ts` - Basic pub/sub\n- `02-autonomous-navigator.ts` - A* pathfinding\n- `06-vision-tracking.ts` - Object tracking with Kalman filters\n- `08-adaptive-learning.ts` - Experience-based learning\n\nRun any example:\n\n```bash\nnpm run build:ts\nnode examples/01-hello-robot.ts\n```\n\n## ROS2 Compatibility\n\nThe Node.js bindings are fully compatible with ROS2:\n\n```typescript\n// Publish to ROS2 topic\nconst pubCmd = node.createPublisher<Twist>('/cmd_vel');\npubCmd.publish({\n    linear: { x: 0.5, y: 0, z: 0 },\n    angular: { x: 0, y: 0, z: 0.1 },\n});\n\n// Subscribe from ROS2 topic\nconst subPose = node.createSubscriber<PoseStamped>('/robot/pose');\n```\n\nBridge with ROS2:\n\n```bash\n# Terminal 1: Node.js app\nnode my-robot.js\n\n# Terminal 2: ROS2\nros2 topic echo /cmd_vel\n```\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT License ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Links\n\n- **Homepage**: [ruv.io](https://ruv.io)\n- **Documentation**: [docs.rs/agentic-robotics-node](https://docs.rs/agentic-robotics-node)\n- **npm Package**: [npmjs.com/package/agentic-robotics](https://www.npmjs.com/package/agentic-robotics)\n- **Repository**: [github.com/ruvnet/vibecast](https://github.com/ruvnet/vibecast)\n\n---\n\n**Part of the Agentic Robotics framework** • Built with ❤️ by the Agentic Robotics Team\n","readmeFilename":"README.md"}