{"_id":"@aerograph/sdk","_rev":"4-1a14b5f598a75bc2cec4d5cf70d18a47","name":"@aerograph/sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@aerograph/sdk","version":"0.1.0","keywords":["ai","agent","sdk","trace","observability"],"license":"Apache-2.0","_id":"@aerograph/sdk@0.1.0","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"homepage":"https://github.com/SGcpu/AeroGraph#readme","bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"dist":{"shasum":"9987afe11f568eb15af10e48a30e36ea73c4bfe3","tarball":"https://registry.npmjs.org/@aerograph/sdk/-/sdk-0.1.0.tgz","fileCount":6,"integrity":"sha512-buE1aE59xlhZ1OwMhqqG9fB9dN5b5etv9IjeOLCkAhGzPYYDNsIZFUOQO6LppkwhHK9EIIm+LGf3Ips7/vUjsQ==","signatures":[{"sig":"MEUCIGRFZQgeGr9mkD1l1TeMxIpq32uczIskuYaI09OHqf8JAiEA53t46f9hkhejGg66Dx1DzakaoaApv/3VdujeMT3lh/I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22838},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"78b10bff882d92a0e04cb1b777b5dd7579105ca5","private":false,"scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\""},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"repository":{"url":"git+https://github.com/SGcpu/AeroGraph.git","type":"git"},"_npmVersion":"11.5.2","description":"Reference SDK for emitting AeroGraph trace events from AI applications.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"nanoid":"^5.0.7","@aerograph/contracts":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","vitest":"^2.1.0","@eslint/js":"^9.9.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1779656900201_0.45608946285553587","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aerograph/sdk","version":"0.2.0","keywords":["ai","agent","sdk","trace","observability"],"license":"Apache-2.0","_id":"@aerograph/sdk@0.2.0","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"homepage":"https://github.com/SGcpu/AeroGraph#readme","bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"dist":{"shasum":"0289915703672192ec2c69031836587f26cd2801","tarball":"https://registry.npmjs.org/@aerograph/sdk/-/sdk-0.2.0.tgz","fileCount":6,"integrity":"sha512-I9ii8rEmu4cY6ZkDs/IYcm1glEO12ize6FdT+aEWlHcG5gO0J73W6tpnKnXKUBqVQQO704BXpOShATVlwYlbTQ==","signatures":[{"sig":"MEYCIQDW8lwFbfeQZWp5Jf8m6sG3P5uEXtbGTR8KpgSks+iv9AIhAJwn7LIvxLNTTCpRLNGxG2LoMPhmir3E4aMNEzDeSYOK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22838},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f4f3747cd6026d768e7f6f4d1b43de22f10b0d30","private":false,"scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\""},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"repository":{"url":"git+https://github.com/SGcpu/AeroGraph.git","type":"git"},"_npmVersion":"11.5.2","description":"Reference SDK for emitting AeroGraph trace events from AI applications.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"nanoid":"^5.0.7","@aerograph/contracts":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","vitest":"^2.1.0","@eslint/js":"^9.9.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1780467870013_0.16841927128043532","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aerograph/sdk","version":"0.2.1","keywords":["ai","agent","sdk","trace","observability"],"license":"Apache-2.0","_id":"@aerograph/sdk@0.2.1","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"homepage":"https://github.com/SGcpu/AeroGraph#readme","bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"dist":{"shasum":"44f0c38cfbc7140912f0ca6503db2a45487b26b7","tarball":"https://registry.npmjs.org/@aerograph/sdk/-/sdk-0.2.1.tgz","fileCount":6,"integrity":"sha512-TAv1A+yibVe2PgbMoaSkhfWysGYWsLjKTnpEGEvx5JIPpWrhNUjblZUkdBy5T/PxVCILRXrUeFz2kWg6VdHrtQ==","signatures":[{"sig":"MEUCIQC6xz0MGhyz+uX+IIVAii1KGoD6njj1v+AcaryEUaz+twIgdEiTpIGqfPv5LLcJAv/yoOL6EeQEHNM/9Bn8jxQ2jEM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23763},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"73ae8bebcf941d8f9abd0649da761cca15d19794","private":false,"scripts":{"dev":"tsc -p tsconfig.json --watch","lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\""},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"repository":{"url":"git+https://github.com/SGcpu/AeroGraph.git","type":"git"},"_npmVersion":"11.5.2","description":"Reference SDK for emitting AeroGraph trace events from AI applications.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"nanoid":"^5.0.7","@aerograph/contracts":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","vitest":"^2.1.0","@eslint/js":"^9.9.0","typescript":"^5.6.0","typescript-eslint":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.1_1781117159588_0.3609654014133148","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aerograph/sdk","version":"0.3.0","private":false,"description":"Reference SDK for emitting AeroGraph trace events from AI applications.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/SGcpu/AeroGraph.git"},"bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"homepage":"https://github.com/SGcpu/AeroGraph#readme","publishConfig":{"access":"public"},"keywords":["ai","agent","sdk","trace","observability"],"scripts":{"prebuild":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","build":"tsc -p tsconfig.json","dev":"tsc -p tsconfig.json --watch","test":"vitest run","lint":"eslint ."},"dependencies":{"@aerograph/contracts":"0.3.0","nanoid":"^5.0.7"},"devDependencies":{"typescript":"^5.6.0","vitest":"^2.1.0","eslint":"^9.9.0","@eslint/js":"^9.9.0","typescript-eslint":"^8.0.0"},"_id":"@aerograph/sdk@0.3.0","gitHead":"9504b907ff5e3c49d3ec8c6e8f47fb2f46d1436f","_nodeVersion":"22.17.1","_npmVersion":"11.5.2","dist":{"integrity":"sha512-cSMYdxKCwhGSVaG8fF1k8cIIHqxcXRmSuN87R2xUEUy923B5uadGmMtWsJKcoaPccYKcKddNN8R7OGWIET6ryA==","shasum":"be0213e588d3c3b0bc2b4d18a4fe2139ca36ec81","tarball":"https://registry.npmjs.org/@aerograph/sdk/-/sdk-0.3.0.tgz","fileCount":10,"unpackedSize":41434,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDBc+xv5Lt8PVMrRkC0zWidiRNm03X5Cu8SW1S58I+5jgIhAIg5UuuJezfTZ1pZIUTBMjcdCTlEv2wLVa5wGFQF2Rxr"}]},"_npmUser":{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"},"directories":{},"maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.3.0_1782813449086_0.11825223030490273"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-24T21:08:19.956Z","modified":"2026-06-30T09:57:29.374Z","0.1.0":"2026-05-24T21:08:20.392Z","0.2.0":"2026-06-03T06:24:30.147Z","0.2.1":"2026-06-10T18:45:59.773Z","0.3.0":"2026-06-30T09:57:29.235Z"},"bugs":{"url":"https://github.com/SGcpu/AeroGraph/issues"},"license":"Apache-2.0","homepage":"https://github.com/SGcpu/AeroGraph#readme","keywords":["ai","agent","sdk","trace","observability"],"repository":{"type":"git","url":"git+https://github.com/SGcpu/AeroGraph.git"},"description":"Reference SDK for emitting AeroGraph trace events from AI applications.","maintainers":[{"name":"sgcpu","email":"sian.frcrce.stuco@gmail.com"}],"readme":"# @aerograph/sdk\r\n\r\nThe core Node.js Flight Recorder for emitting normalized trace events from any JavaScript/TypeScript codebase to the AeroGraph collector.\r\n\r\n## Overview\r\n\r\nAeroGraph is an open-source cognitive observability layer for AI agent workflows. It allows you to record, playback, and visually inspect the deterministic decision-making paths of your agents.\r\n\r\nThis SDK provides a `FlightRecorder` instance to seamlessly construct and emit strictly validated `TraceEvent` objects.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @aerograph/sdk\r\n```\r\n\r\n*(Requires Node.js >= 18.18.0)*\r\n\r\n## Quick Start\r\n\r\n```typescript\r\nimport { FlightRecorder } from \"@aerograph/sdk\";\r\n\r\n// 1. Initialize the recorder\r\nconst recorder = new FlightRecorder({\r\n  endpoint: \"http://localhost:4317\", // AeroGraph Collector URL\r\n  actor: {\r\n    id: \"my-travel-agent\",\r\n    name: \"Travel Planner\",\r\n  },\r\n  projectId: \"travel-app\", // Optional (v1.1.0)\r\n  environment: \"production\" // Optional (v1.1.0)\r\n});\r\n\r\n// 2. Emit events\r\nconst promptEvent = await recorder.prompt({\r\n  text: \"Plan a trip to Tokyo\",\r\n  // Optional v1.1.0 canonical telemetry\r\n  model: { name: \"gpt-4o\", provider: \"openai\" },\r\n  usage: { inputTokens: 10, totalTokens: 10 },\r\n  durationMs: 50\r\n});\r\n\r\nconst responseEvent = await recorder.response({\r\n  parentSpanId: promptEvent.spanId,\r\n  text: \"Here is your 3-day itinerary...\",\r\n  usage: { inputTokens: 10, outputTokens: 50, totalTokens: 60 },\r\n  durationMs: 2500\r\n});\r\n```\r\n\r\n## Available Event Kinds\r\n\r\nThe `FlightRecorder` supports 10 canonical event kinds:\r\n- `prompt`: Input sent to an LLM.\r\n- `response`: Output from an LLM.\r\n- `tool_call`: Invocation of a tool.\r\n- `tool_result`: The tool's resulting output.\r\n- `handoff`: Delegating execution from one agent to another.\r\n- `error`: Any exception or system failure.\r\n- `retriever`: RAG retrieval query and source documents.\r\n- `state_snapshot`: A deterministic hash of a LangGraph node's state.\r\n- `checkpoint`: A human-in-the-loop pause.\r\n- `note`: Freeform structured annotations.\r\n\r\n## Span Hierarchy\r\n\r\nEvery event acts as a \"span\" in the trace tree. To link a child event to a parent event, pass the parent's `spanId` via the `parentSpanId` parameter:\r\n\r\n```typescript\r\nconst root = await recorder.prompt({ text: \"root prompt\" });\r\nconst child = await recorder.tool_call({ \r\n  parentSpanId: root.spanId, \r\n  toolId: \"search\", \r\n  input: { q: \"query\" } \r\n});\r\n```\r\n\r\n## License\r\nApache-2.0\r\n","readmeFilename":"README.md"}