{"_id":"moda-ai","_rev":"19-8cd5166fa6e35ab6523beca6679dc7bc","name":"moda-ai","dist-tags":{"latest":"1.20.0"},"versions":{"0.1.1":{"name":"moda-ai","version":"0.1.1","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.1","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"97c04cecb3c283a989e2c44869345cce76a75795","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.1.tgz","fileCount":7,"integrity":"sha512-n5Nj32Y1Geu351/YYHR1M9kZtE7StfDvISKZEngjSax9t1gpUNcKGR0rNaQh986aL0SzCmoAfveapGtOeqZAig==","signatures":[{"sig":"MEUCIQCo3ohOekfKYoZVqrX0xQsd+5c8tMuZAXbg+3PVQ/LgUQIgez7WaIS8LysIs1E+nPzo4D+2OjgZRnNR1XUMFz0CAtw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150062},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"be1fed5669cc21819b34331ea369c888e51dc28c","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0 <6.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.1_1769041853741_0.9724645267454517","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"moda-ai","version":"0.1.2","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.2","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"a7861d1459a035819bedc344be944025556cd8a0","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.2.tgz","fileCount":7,"integrity":"sha512-uzYRvqS02QLYFMmv0UT3ljWrZB8RILe8fRZtrcbtwX0Q0S0g0WHb+h9fT3TdMT3dmkZCX9i2Ak1gQNmNMb9DSA==","signatures":[{"sig":"MEUCIQDFa0TNvmz8udbTUDyYxSCfvggha4In+qBK1K4u1N3yoAIgRqeO82hnD6Fpo9WsWvdEoHceTIC2Z2Bgc5iB7EpjQp4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":152626},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"bc7375d4ec1a2ffb9f15d2843a9cf987ca40a8e7","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0 <6.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.2_1769583881222_0.003450741429551707","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"moda-ai","version":"0.1.3","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.3","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"4dd8b0aba52738eda1655c36827c3cd39118729d","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.3.tgz","fileCount":7,"integrity":"sha512-dR7N0TzOjBYVLPhPkpNlY8zzBHQW7h0U2akd5MNOpy1cQP8JQeQFPcoyMW6/iYuwsXA/GTg1hicYsevt+C2tVA==","signatures":[{"sig":"MEUCIF0RpSq0LP1G7tKpBp0dZmkC7qUgXX/dz+HOO48TD3NFAiEA5crzq/4m67V/n5d0cBieWuYwgq6D+UFkI7LOJXxSo4M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154354},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"b6f0405f60ec7776495f9a088dfbe1128ba6c0c5","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0 <6.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.3_1769721425967_0.06244947258868083","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"moda-ai","version":"0.1.5","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.5","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"9e3c284ff300bbca41c706e2a998974d9f474d39","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.5.tgz","fileCount":7,"integrity":"sha512-FBPMmIwK7Woh0MnumuYVdzJL0ZOzGTV+Lzx8J5ZrVpdcuRCIvSW26Ulj3BxNMLdWW4VSeOyB9egdb+pw4zMegg==","signatures":[{"sig":"MEUCIQCKzOt4BXNwKJvdNaC/WuYcX+/sXsz7m6Fyw8mUeBuUnAIgDWtGYGi2M/j/2li4WAu3Bxd3qF34I6sS7u5dFoq75Qc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154983},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"a9d3b5fa319164d89510e86c42a509f70ce00ba8","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.5_1769740792700_0.42061344226154884","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"moda-ai","version":"0.1.8","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.8","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"1e43191ae0d5723f4f687f1ae117970d822fb997","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.8.tgz","fileCount":7,"integrity":"sha512-NPhzhZTB/WgcMK4rk/ldcFZ5+lpyTGTEf94lvjHgKk/OK8EkN8BKjkVIk2dU+1KCjWgsVXK6l9SCIS1CQ9Ep9w==","signatures":[{"sig":"MEUCIEFXiy/NJIvIN0UTP9UCRN7ZlqjiwrcUFXO+8xKe2kKEAiEAo+psPck6lWe39h1XqLeNAOQs8qi63yHiWHucUAlbqYk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208911},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"ceef6cd725d569ec0c907d007648f5b079985fd7","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.8_1769894965446_0.8167784471041402","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"moda-ai","version":"0.1.9","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.9","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"5ee12bb8b51cf3e7fbd73781fb151b79b2506122","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.9.tgz","fileCount":7,"integrity":"sha512-8WiX9WUHJRyP+RfTcQm17GgbJvdRUAgSeqp46CNCvhnjvG2iPaFvNjK9cg3CL4OzAj1rpEzvRV31Ab9PPQjn7Q==","signatures":[{"sig":"MEYCIQDrRszvCJzQOlQfOJIOO6EALo+yV6rqGOzBO0qveTq8wQIhAJTcOk0FJoF6wCq9VJ+EE41GgrwBTUWOPj1pRS6nAOIZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":210877},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"35f671d8a120aed632c3d8df6b99be85129a731a","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.9_1770012141395_0.8761601796572369","host":"s3://npm-registry-packages-npm-production"}},"0.1.10":{"name":"moda-ai","version":"0.1.10","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.10","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"c4b9c1a455393188b09d8438dbf20bd79e108818","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.10.tgz","fileCount":7,"integrity":"sha512-RviwEE3gej37GJ9mHpejxYkr5uHg+9jfX4bMVBx8UP/9+z/7CrAaP9i6OSv29xveA3qh7ckGgc3STBt4vjcVWw==","signatures":[{"sig":"MEYCIQDXOcapelxCeqRUS2ZfTZfHomB/Uxfb1pvVMf0wkqBH9QIhAORklQ6ERM4wLKM10JOtfiAleSb7RcaLPCn4WNd9aJNC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":218826},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"7d9e42689957f1f75068619bc74fe8686591deff","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.10_1770012540897_0.7724957292146597","host":"s3://npm-registry-packages-npm-production"}},"0.1.12":{"name":"moda-ai","version":"0.1.12","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.12","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"6d16971c95ca03f770cebb769e1034dc8ed0c1c4","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.12.tgz","fileCount":7,"integrity":"sha512-IwxFf76hceNZaPNy/zcE7aCpiixy6R/eXxyV3U7MyK/+nnTrn3FpIQpBnGFY/o5WrCupWamtuqWDmKHoBimX1w==","signatures":[{"sig":"MEUCIQCupVvzYx6lORPpq/LKmOTrIqYFzTA2NBaHyALgd8uSBgIgLaZ+8NyYRH9mJpXeLbB/5XGYl+8g2uL2lRRbESwo3P4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":219118},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"1ea2f79f7a3e286b02a8b6b937b7b2b97a3efac8","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.12_1770013051882_0.9779709678145339","host":"s3://npm-registry-packages-npm-production"}},"0.1.13":{"name":"moda-ai","version":"0.1.13","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.13","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"620bc7c0549b5f29db6888427f15bae44f87c404","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.13.tgz","fileCount":7,"integrity":"sha512-dhuITaaIGqtKEq4SLQQBNum3tTC6Lay3EgrIcgOuMmkpplwAlKhjvhu//dt0jNJXKPGge6QQYDiYkRo+Co9/iA==","signatures":[{"sig":"MEYCIQDkq4AhVmIgc9owP0yPfeytKQ5e8xE3RkHTBs2vn5p0OwIhAKFEX0Y4K1h4Bk0IAqK1ktyzERzm0rQhD2k4z2q17iyy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":219118},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"8df190a579e0bac87bd48c92361bf360f8c5a758","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.13_1770013212603_0.27300729977201477","host":"s3://npm-registry-packages-npm-production"}},"0.1.14":{"name":"moda-ai","version":"0.1.14","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.14","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"51bb7b3d747bc6b73fb59579f008c24cd7e4d602","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.14.tgz","fileCount":7,"integrity":"sha512-sMxv15guPqGbdgIjuP9YKN5WS9fKCmrecPCaoOH6K3D0T3LR6cCLImk65q4sZMPZGJxxL10gbw9ed5NVw4H93g==","signatures":[{"sig":"MEUCIH42tnkcleZyqlbLuijR8K6HfjqyGdsqlNudaK1oGtVGAiEA1nYL+O47ahrxBBgC7KRJH/TkDI6627DlBCcVUFXfKww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":219176},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"2f0cff0dcbdbdaa666eb415709a12405694227e3","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda LLM observability with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.14_1770151531178_0.12685071660333036","host":"s3://npm-registry-packages-npm-production"}},"0.1.15":{"name":"moda-ai","version":"0.1.15","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@0.1.15","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"5b7c2aa0f2d16c6da59ef2b1c8a670ffcc004a9e","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-0.1.15.tgz","fileCount":7,"integrity":"sha512-MqA0RuB4d2m+dEbT2qxuD7YxPzLtH6/7D7XVyQKc4Hbnrpcb2qxUsgQpIxKc0qRNiVQ4v34opWmYGw1fYZp2cA==","signatures":[{"sig":"MEUCIQDl8kW6dNBi80wciaK2LjwzvXVd/0gi5fzgsn1cw08szQIgNR3sSurkNfsv1FlumVzjhJEptKa4HcTAr+CU80q9roI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":227216},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"f7ffb5db349932e78648dcc672af7cf14f51876b","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda AI analytics with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_0.1.15_1770658668810_0.7064918959235444","host":"s3://npm-registry-packages-npm-production"}},"1.15.1":{"name":"moda-ai","version":"1.15.1","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda"],"author":{"name":"Moda"},"license":"MIT","_id":"moda-ai@1.15.1","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://github.com/moda/moda-node#readme","bugs":{"url":"https://github.com/moda/moda-node/issues"},"dist":{"shasum":"34ec878c107fe397f395cd2d489af951f2d6fbf5","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.15.1.tgz","fileCount":7,"integrity":"sha512-EzIjCAIDtKyEibbd1Msl8LW7umN4Z1uzmZXjPqpdLVKNxWmqUYDQwHHbP88ljsq/L/W37UCKT19v2Y7/xDKtDw==","signatures":[{"sig":"MEYCIQCI8Gcno+Ezn3z4UCHP7tOuiFBW0uldcsJeogDKH1RTCAIhAJNgL2RR4y6UeVUcVkCpszJCqddhASZ6bqJ7u4VmheNj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315260},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"3f3616acdd36e8dcf03a34e7831528366f8a3290","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"repository":{"url":"git+https://github.com/moda/moda-node.git","type":"git"},"_npmVersion":"10.8.2","description":"Official TypeScript/Node.js SDK for Moda AI analytics with automatic conversation threading","directories":{},"_nodeVersion":"20.20.0","dependencies":{"@opentelemetry/api":"^1.7.0","@opentelemetry/resources":"^1.22.0","@opentelemetry/sdk-trace-base":"^1.22.0","@opentelemetry/sdk-trace-node":"^1.22.0","@opentelemetry/instrumentation":"^0.49.0","@opentelemetry/semantic-conventions":"^1.22.0","@opentelemetry/exporter-trace-otlp-proto":"^0.49.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_1.15.1_1773014465016_0.056269844340198105","host":"s3://npm-registry-packages-npm-production"}},"1.16.0":{"name":"moda-ai","version":"1.16.0","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"author":"Moda","license":"MIT","_id":"moda-ai@1.16.0","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"}],"homepage":"https://moda.dev","bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"dist":{"shasum":"0cc6f096002fb78a9410da266e5440959bbfd933","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.16.0.tgz","fileCount":17,"integrity":"sha512-CTLoNAe/r8sIuHnLbd4NOoLYQhcc+7uG7ZGO1GyjIVC2IAWsBC4DRPW8oKroQVpnXMpOUrcS3q04pBVJzJvr7w==","signatures":[{"sig":"MEQCICHgP6Kk+9Rzmk0RrUCmqKLBsE1TZBjMKPZnHtfCEVsiAiBX/9p76pt3/9XqLKOgi/jRrSqYID+pwNCypaUz15jWRw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC+lrlSommAslmXfflAx0AN4s7EagPlCQqpMqLrm5Hw6AIgEO8L46y/li7kqfLvFz3XcBz2JTv4a17ODRO6MHJae34=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":374206},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","shasum":"0cc6f096002fb78a9410da266e5440959bbfd933","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./ai7":{"types":"./dist/ai7.d.ts","import":"./dist/ai7.mjs","require":"./dist/ai7.cjs"},"./think":{"types":"./dist/think.d.ts","import":"./dist/think.mjs","require":"./dist/think.cjs"}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"_integrity":"sha512-CTLoNAe/r8sIuHnLbd4NOoLYQhcc+7uG7ZGO1GyjIVC2IAWsBC4DRPW8oKroQVpnXMpOUrcS3q04pBVJzJvr7w==","repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"_npmVersion":"10.8.3","description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-base":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/instrumentation":"0.57.2","@opentelemetry/otlp-transformer":"0.57.2","@opentelemetry/semantic-conventions":"1.28.0","@opentelemetry/exporter-trace-otlp-proto":"0.57.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"ai":"7.0.99","tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@ai-sdk/otel":"1.0.99","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"ai":"^7.0.99","openai":">=4.0.0","@ai-sdk/otel":"^1.0.99","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"ai":{"optional":true},"openai":{"optional":true},"@ai-sdk/otel":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_1.16.0_1789505575161_0.002393752855817999","host":"s3://npm-registry-packages-npm-production"}},"1.17.0":{"name":"moda-ai","version":"1.17.0","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"author":"Moda","license":"MIT","_id":"moda-ai@1.17.0","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"},{"name":"moda-mo","email":"mohammad@modaflows.com"},{"name":"branavanj","email":"branavan.jegatheeswaran@gmail.com"}],"homepage":"https://moda.dev","bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"dist":{"shasum":"694c80652baf55935658ac018f8c495c936d752d","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.17.0.tgz","fileCount":22,"integrity":"sha512-rFhwbwl0oYB1sBUQ2oKXJAq2DzBU7rNmXToNAasOuwakNpJcYzwuM25R9ZPzoaVg4mYmqc4gdpe5z5a6npFf+w==","signatures":[{"sig":"MEUCIQDSa98oYKT08tf41hF6RDJRjg/xtQNhCBfPHolRwl8NjAIgAqBJEMZnT273VKDX9fLg6durYxh3hw92LbzG8ocj/KU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIG6SXAgHjGge53Y1oW13LezQKiAba13rggckdIcZXJ87AiAJGgnE4iLV0t6VXRElHxv3yYywG1WX9/M+9vnoeTbF7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":577124},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","shasum":"694c80652baf55935658ac018f8c495c936d752d","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./ai7":{"types":"./dist/ai7.d.ts","import":"./dist/ai7.mjs","require":"./dist/ai7.cjs"},"./think":{"types":"./dist/think.d.ts","import":"./dist/think.mjs","require":"./dist/think.cjs"},"./turn-snapshot":{"types":"./dist/turn-snapshot.d.ts","import":"./dist/turn-snapshot.mjs","require":"./dist/turn-snapshot.cjs"}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"_integrity":"sha512-rFhwbwl0oYB1sBUQ2oKXJAq2DzBU7rNmXToNAasOuwakNpJcYzwuM25R9ZPzoaVg4mYmqc4gdpe5z5a6npFf+w==","repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"_npmVersion":"10.8.3","description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-base":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/instrumentation":"0.57.2","@opentelemetry/otlp-transformer":"0.57.2","@opentelemetry/semantic-conventions":"1.28.0","@opentelemetry/exporter-trace-otlp-proto":"0.57.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"ai":"7.0.99","zod":"4.1.8","tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@ai-sdk/otel":"1.0.99","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"ai":"^7.0.99","openai":">=4.0.0","@ai-sdk/otel":"^1.0.99","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"ai":{"optional":true},"openai":{"optional":true},"@ai-sdk/otel":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_1.17.0_1793223342764_0.9361675724641914","host":"s3://npm-registry-packages-npm-production"}},"1.18.0":{"name":"moda-ai","version":"1.18.0","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"author":"Moda","license":"MIT","_id":"moda-ai@1.18.0","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"},{"name":"moda-mo","email":"mohammad@modaflows.com"},{"name":"branavanj","email":"branavan.jegatheeswaran@gmail.com"}],"homepage":"https://moda.dev","bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"dist":{"shasum":"fc8ec28101642c4dd115af3a3ec86d1776c52eda","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.18.0.tgz","fileCount":22,"integrity":"sha512-uJCt+JKwvtrYluCNAb7ZwIAojhfqu7S2dK+KGbkbkhGeAwZEV71yFBnR0RWucRsj4u6ChYjQLQYkH9G0cfFy9w==","signatures":[{"sig":"MEUCIQCld1aiyqmJKKsJqd3DcLk+ALzMUlQ3OcluKYyi8sHL0gIgZi/7qxhxyoHfQSb4pGiHoGRf6Mcp8cRntP+/CKOl29A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCCPeXi6s/+CGRe+f7ex+aZpnku+apo2UsoKuq46A9wkQIgKDVN66g63Kn+2tG9t0/4gM5lFCG88nOYTj4BkqFX/VU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":646710},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","shasum":"fc8ec28101642c4dd115af3a3ec86d1776c52eda","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./ai7":{"types":"./dist/ai7.d.ts","import":"./dist/ai7.mjs","require":"./dist/ai7.cjs"},"./think":{"types":"./dist/think.d.ts","import":"./dist/think.mjs","require":"./dist/think.cjs"},"./turn-snapshot":{"types":"./dist/turn-snapshot.d.ts","import":"./dist/turn-snapshot.mjs","require":"./dist/turn-snapshot.cjs"}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"_integrity":"sha512-uJCt+JKwvtrYluCNAb7ZwIAojhfqu7S2dK+KGbkbkhGeAwZEV71yFBnR0RWucRsj4u6ChYjQLQYkH9G0cfFy9w==","repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"_npmVersion":"10.8.3","description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-base":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/instrumentation":"0.57.2","@opentelemetry/otlp-transformer":"0.57.2","@opentelemetry/semantic-conventions":"1.28.0","@opentelemetry/exporter-trace-otlp-proto":"0.57.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"ai":"7.0.99","zod":"4.1.8","tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@ai-sdk/otel":"1.0.99","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"ai":"^7.0.99","openai":">=4.0.0","@ai-sdk/otel":"^1.0.99","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"ai":{"optional":true},"openai":{"optional":true},"@ai-sdk/otel":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_1.18.0_1794215223275_0.10715651146164484","host":"s3://npm-registry-packages-npm-production"}},"1.18.1":{"name":"moda-ai","version":"1.18.1","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"author":"Moda","license":"MIT","_id":"moda-ai@1.18.1","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"},{"name":"moda-mo","email":"mohammad@modaflows.com"},{"name":"branavanj","email":"branavan.jegatheeswaran@gmail.com"}],"homepage":"https://moda.dev","bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"dist":{"shasum":"4b99d99dfc70f97b9cf057929cc83839d8907c5b","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.18.1.tgz","fileCount":22,"integrity":"sha512-okT6+nIFjG/6R0qbfJdYL4VEUOjx41wKo1lhpPYKB8T6Wtq9wqdtDM7feaJfkq/2NO5ko/z6z4wO9n5fKPzGBg==","signatures":[{"sig":"MEQCIHpN/2SL4M9h9ULPik4z2GtiHq+s8zGxnI6umusQTUCfAiAyg8s9mVGrgJVQxrYGzd+wp8+BvqJAWS6HBJyFXumGSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICygEuCzltz9JxCVMwzkqVTwzt/iUPHf2XqttEuIzX9sAiEAkXGOOGb10Kbl7RaK/u/3cewO/lfV9YvT4ltWoOec310=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":679314},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","shasum":"4b99d99dfc70f97b9cf057929cc83839d8907c5b","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./ai7":{"types":"./dist/ai7.d.ts","import":"./dist/ai7.mjs","require":"./dist/ai7.cjs"},"./think":{"types":"./dist/think.d.ts","import":"./dist/think.mjs","require":"./dist/think.cjs"},"./turn-snapshot":{"types":"./dist/turn-snapshot.d.ts","import":"./dist/turn-snapshot.mjs","require":"./dist/turn-snapshot.cjs"}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"_integrity":"sha512-okT6+nIFjG/6R0qbfJdYL4VEUOjx41wKo1lhpPYKB8T6Wtq9wqdtDM7feaJfkq/2NO5ko/z6z4wO9n5fKPzGBg==","repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"_npmVersion":"10.8.3","description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-base":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/instrumentation":"0.57.2","@opentelemetry/otlp-transformer":"0.57.2","@opentelemetry/semantic-conventions":"1.28.0","@opentelemetry/exporter-trace-otlp-proto":"0.57.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"ai":"7.0.99","zod":"4.1.8","tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@ai-sdk/otel":"1.0.99","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"ai":"^7.0.99","openai":">=4.0.0","@ai-sdk/otel":"^1.0.99","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"ai":{"optional":true},"openai":{"optional":true},"@ai-sdk/otel":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/moda-ai_1.18.1_1794222151371_0.6800083971778819","host":"s3://npm-registry-packages-npm-production"}},"1.20.0":{"_id":"moda-ai@1.20.0","bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"dist":{"shasum":"fdf47bd2cb2f52495341577a4fe39f06157f51f8","tarball":"https://registry.npmjs.org/moda-ai/-/moda-ai-1.20.0.tgz","fileCount":38,"integrity":"sha512-qYarC9a+Wx7Dcikf2/LckWJzt2e+Zfitm8596j4P1dBh9B+fMBQqjDYiIyXHhAmq8eanDguBRKfSBt5Ifv1cJQ==","signatures":[{"sig":"MEQCIEjcVpf69W3Et3QJyDixXMETASEg+ys5vp8NPyn9/YpkAiBZKUtb/KZUTQS3soUOiS+M+4e7Kb6gRX0RWRM2mQgCgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbRJfPQ+GJXrpQS51Na+a79SKHskwAGyMg5086J6IwfgIgT0/mnQNPfZ3S2JLVvrvjeN4qbv3b+25mc/29In2ljkI="}],"unpackedSize":1079921},"main":"./dist/index.cjs","name":"moda-ai","types":"./dist/index.d.ts","author":{"name":"Moda"},"module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./ai7":{"types":"./dist/ai7.d.ts","import":"./dist/ai7.mjs","require":"./dist/ai7.cjs"},"./media":{"types":"./dist/media.d.ts","import":"./dist/media.mjs","require":"./dist/media.cjs"},"./state":{"types":"./dist/state.d.ts","import":"./dist/state.mjs","require":"./dist/state.cjs"},"./think":{"types":"./dist/think.d.ts","import":"./dist/think.mjs","require":"./dist/think.cjs"},"./workers":{"types":"./dist/workers.d.ts","import":"./dist/workers.mjs","require":"./dist/workers.cjs"},"./turn-snapshot":{"types":"./dist/turn-snapshot.d.ts","import":"./dist/turn-snapshot.mjs","require":"./dist/turn-snapshot.cjs"}},"gitHead":"c9c9b3c6a4077d91e44bcc838bb1321d272cd614","license":"MIT","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"rollup -c","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"bun run clean && bun run build"},"version":"1.20.0","_npmUser":{"name":"pranavbedi10","email":"pranav@modaflows.com"},"homepage":"https://moda.dev","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"_npmVersion":"11.19.1","description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","directories":{},"maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"},{"name":"moda-mo","email":"mohammad@modaflows.com"},{"name":"branavanj","email":"branavan.jegatheeswaran@gmail.com"}],"_nodeVersion":"24.22.1","dependencies":{"@opentelemetry/api":"1.9.1","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-base":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/instrumentation":"0.57.2","@opentelemetry/otlp-transformer":"0.57.2","@opentelemetry/semantic-conventions":"1.28.0","@opentelemetry/exporter-trace-otlp-proto":"0.57.2"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"ai":"7.0.99","zod":"4.1.8","tslib":"^2.6.2","openai":"^6.17.0","rollup":"^4.9.0","vitest":"^1.2.0","typescript":"^5.3.3","@types/node":"^20.11.0","@ai-sdk/otel":"1.0.99","@anthropic-ai/sdk":"^0.72.1","rollup-plugin-dts":"^6.1.0","@rollup/plugin-typescript":"^11.1.6"},"peerDependencies":{"ai":"^7.0.99","openai":">=4.0.0","@ai-sdk/otel":"^1.0.99","@anthropic-ai/sdk":">=0.18.0"},"peerDependenciesMeta":{"ai":{"optional":true},"openai":{"optional":true},"@ai-sdk/otel":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moda-ai_1.20.0_1794810930497_0.11825833757098203"}}},"time":{"created":"2026-01-22T00:30:53.740Z","modified":"2026-11-16T06:35:30.737Z","0.1.1":"2026-01-22T00:30:53.887Z","0.1.2":"2026-01-28T07:04:41.378Z","0.1.3":"2026-01-29T21:17:06.123Z","0.1.5":"2026-01-30T02:39:52.832Z","0.1.8":"2026-01-31T21:29:25.606Z","0.1.9":"2026-02-02T06:02:21.541Z","0.1.10":"2026-02-02T06:09:01.044Z","0.1.12":"2026-02-02T06:17:32.017Z","0.1.13":"2026-02-02T06:20:12.749Z","0.1.14":"2026-02-03T20:45:31.361Z","0.1.15":"2026-02-09T17:37:48.976Z","1.15.1":"2026-03-09T00:01:05.188Z","1.16.0":"2026-09-15T20:52:55.274Z","1.17.0":"2026-10-28T21:35:42.887Z","1.18.0":"2026-11-09T09:07:03.384Z","1.18.1":"2026-11-09T11:02:31.485Z","1.20.0":"2026-11-16T06:35:30.593Z"},"bugs":{"url":"https://github.com/ModaLabs/moda-node/issues"},"author":{"name":"Moda"},"license":"MIT","homepage":"https://moda.dev","keywords":["llm","observability","openai","anthropic","tracing","opentelemetry","moda","ai-agents","continual-learning","agent-observability"],"repository":{"url":"git+https://github.com/ModaLabs/moda-node.git","type":"git"},"description":"Official Node.js/TypeScript SDK for Moda — the continual learning layer for AI agents. Automatic conversation threading and OpenTelemetry-native tracing.","maintainers":[{"name":"pranavbedi10","email":"pranav@modaflows.com"},{"name":"moda-mo","email":"mohammad@modaflows.com"},{"name":"branavanj","email":"branavan.jegatheeswaran@gmail.com"}],"readme":"# moda-ai\n\nOfficial TypeScript/Node.js SDK for [Moda](https://moda.dev) — the continual learning layer for AI agents. Moda turns production agent traces into validated improvements for your agent harness.\n\nDocs: [docs.moda.dev](https://docs.moda.dev) · Automatic conversation threading · OpenTelemetry-native\n\n## Features\n\n- **Automatic Instrumentation**: Zero-config tracing for OpenAI and Anthropic clients\n- **Vercel AI SDK Integration**: First-class support via `experimental_telemetry` with tool call tracking\n- **Conversation Threading**: Groups multi-turn conversations together\n- **Streaming Support**: Full support for streaming responses\n- **User Tracking**: Associate LLM calls with specific users\n- **OpenTelemetry Native**: Built on OpenTelemetry for standard-compliant telemetry\n\n## Installation\n\n```bash\nnpm install moda-ai\n```\n\n## Quick Start\n\n```typescript\nimport { Moda } from 'moda-ai';\nimport OpenAI from 'openai';\n\n// Initialize once at application startup\nModa.init('moda_your_api_key');\n\n// Set conversation ID for your session (recommended)\nModa.conversationId = 'session_' + sessionId;\n\n// All OpenAI calls are now automatically tracked\nconst openai = new OpenAI();\n\nconst response = await openai.chat.completions.create({\n  model: 'gpt-4',\n  messages: [{ role: 'user', content: 'Hello!' }],\n});\n\n// Flush before exit\nawait Moda.flush();\n```\n\n## Conversation Tracking\n\n### Setting Conversation ID (Recommended)\n\nFor production use, explicitly set a conversation ID to group related LLM calls:\n\n```typescript\n// Property-style API (recommended)\nModa.conversationId = 'support_ticket_123';\nawait openai.chat.completions.create({ ... });\nawait openai.chat.completions.create({ ... });\n// Both calls share the same conversation_id\nModa.conversationId = null;  // clear when done\n\n// Method-style API (also supported)\nModa.setConversationId('support_ticket_123');\nawait openai.chat.completions.create({ ... });\nModa.clearConversationId();\n```\n\n### Setting User ID\n\nAssociate LLM calls with specific users:\n\n```typescript\nModa.userId = 'user_12345';\nawait openai.chat.completions.create({ ... });\nModa.userId = null;  // clear when done\n\n// Or use method-style\nModa.setUserId('user_12345');\nawait openai.chat.completions.create({ ... });\nModa.clearUserId();\n```\n\n### Scoped Context\n\nFor callback-based scoping (useful in async contexts):\n\n```typescript\nimport { withConversationId, withUserId, withContext } from 'moda-ai';\n\n// Scoped conversation ID\nawait withConversationId('my_session_123', async () => {\n  await openai.chat.completions.create({ ... });\n  await openai.chat.completions.create({ ... });\n  // Both calls use 'my_session_123'\n});\n\n// Scoped user ID\nawait withUserId('user_456', async () => {\n  await openai.chat.completions.create({ ... });\n});\n\n// Both at once\nawait withContext('conv_123', 'user_456', async () => {\n  // ...\n});\n```\n\n`withSessionKind(kind, callback)` tags every LLM call inside the callback with\n`moda.session.kind` (for example `'heartbeat'` for a scheduled turn).\n`withLLMCall({ vendor, type, sessionKind })` sets it for one call and overrides\nthe scoped value. `createAI7Telemetry` accepts `sessionKind` and `serviceVersion`\nlike the Think helper.\n\n## Automatic Fallback (Simple Chatbots Only)\n\nIf you don't set a conversation ID, the SDK automatically computes one by hashing the first user message and system prompt. **This only works for simple chatbots where you pass the full message history with each API call:**\n\n```typescript\n// Turn 1\nlet messages = [{ role: 'user', content: 'Hi, help with TypeScript' }];\nconst r1 = await openai.chat.completions.create({ model: 'gpt-4', messages });\n\n// Turn 2 - automatically linked to Turn 1\nmessages.push({ role: 'assistant', content: r1.choices[0].message.content });\nmessages.push({ role: 'user', content: 'How do I read a file?' });\nconst r2 = await openai.chat.completions.create({ model: 'gpt-4', messages });\n\n// Both turns have the SAME conversation_id because \"Hi, help with TypeScript\"\n// is still the first user message in both calls\n```\n\n### Why This Works\n\nLLM APIs are stateless. Each API call must include the full conversation history. The SDK extracts the first user message from the `messages` array and hashes it to create a stable conversation ID across turns.\n\n### When Automatic Detection Does NOT Work\n\n**Agent frameworks (LangChain, Claude Agent SDK, CrewAI, AutoGPT, etc.) do NOT pass full message history.** Each agent iteration typically passes only:\n- System prompt (with context baked in)\n- Tool results from the previous step\n- A continuation prompt\n\nThis means each iteration has a **different** first user message, resulting in **different** conversation IDs:\n\n```typescript\n// Agent iteration 1\nmessages = [{ role: 'user', content: 'What are my top clusters?' }]  // conv_abc123\n\n// Agent iteration 2 (tool result)\nmessages = [{ role: 'user', content: 'Tool returned: ...' }]  // conv_xyz789 - DIFFERENT!\n\n// Agent iteration 3\nmessages = [{ role: 'user', content: 'Based on the data...' }]  // conv_def456 - DIFFERENT!\n```\n\n**For agent-based applications, you MUST use explicit conversation IDs:**\n\n```typescript\n// Wrap your entire agent execution\nModa.conversationId = 'agent_session_' + sessionId;\n\nconst agent = new LangChainAgent();\nawait agent.run('What are my top clusters?');  // All internal LLM calls share same ID\n\nModa.conversationId = null;\n```\n\n## Anthropic Support\n\nWorks the same way with Anthropic's Claude:\n\n```typescript\nimport Anthropic from '@anthropic-ai/sdk';\n\nconst anthropic = new Anthropic();\n\nModa.conversationId = 'claude_session_123';\n\nconst response = await anthropic.messages.create({\n  model: 'claude-3-haiku-20240307',\n  max_tokens: 1024,\n  system: 'You are a helpful assistant.',\n  messages: [{ role: 'user', content: 'Hello!' }],\n});\n```\n\n## OpenClaw Integration\n\nOpenClaw can export OpenTelemetry data through its `diagnostics-otel` plugin.\nUse Moda helpers to generate OpenClaw config and OTEL environment variables.\n\n```typescript\nimport { Moda } from 'moda-ai';\n\nModa.init(process.env.MODA_API_KEY!);\n\nconst openclawConfig = Moda.getOpenClawTelemetryConfig({\n  serviceName: 'openclaw-gateway',\n});\n\nconst openclawEnv = Moda.getOpenClawEnvironment();\n\n// Optionally trace gateway/CLI lifecycle operations\nawait Moda.withOpenClawOperation({ operation: 'gateway.request' }, async ({ span }) => {\n  span.setAttribute('openclaw.route', '/chat');\n  // your OpenClaw call here\n});\n```\n\n## Vercel AI SDK Support\n\nThe Moda SDK integrates with the [Vercel AI SDK](https://ai-sdk.dev/) (`ai` package) via its built-in OpenTelemetry telemetry. Pass `Moda.getVercelAITelemetry()` to the `experimental_telemetry` option on any AI SDK function.\n\n### Basic Usage\n\n```typescript\nimport { Moda } from 'moda-ai';\nimport { generateText } from 'ai';\nimport { openai } from '@ai-sdk/openai';\n\nModa.init('moda_your_api_key');\nModa.conversationId = 'session_123';\n\nconst result = await generateText({\n  model: openai('gpt-4o'),\n  prompt: 'Hello!',\n  experimental_telemetry: Moda.getVercelAITelemetry(),\n});\n```\n\n### Streaming\n\n```typescript\nimport { streamText } from 'ai';\n\nconst result = streamText({\n  model: openai('gpt-4o'),\n  prompt: 'Write a poem about coding',\n  experimental_telemetry: Moda.getVercelAITelemetry(),\n});\n\nfor await (const chunk of result.textStream) {\n  process.stdout.write(chunk);\n}\n```\n\n### Tool Calls\n\nTool calls and results are automatically captured in telemetry spans. The Vercel AI SDK creates `ai.toolCall` child spans with tool name, arguments, and results.\n\n```typescript\nimport { generateText, tool } from 'ai';\nimport { z } from 'zod';\n\nconst result = await generateText({\n  model: openai('gpt-4o'),\n  prompt: 'What is the weather in San Francisco?',\n  experimental_telemetry: Moda.getVercelAITelemetry(),\n  tools: {\n    getWeather: tool({\n      description: 'Get the current weather',\n      parameters: z.object({\n        location: z.string(),\n      }),\n      execute: async ({ location }) => {\n        return { temperature: 72, condition: 'sunny', location };\n      },\n    }),\n  },\n  maxSteps: 3,\n});\n```\n\n### Structured Output (generateObject)\n\n```typescript\nimport { generateObject } from 'ai';\nimport { z } from 'zod';\n\nconst result = await generateObject({\n  model: openai('gpt-4o'),\n  prompt: 'Generate a recipe for pasta',\n  schema: z.object({\n    name: z.string(),\n    ingredients: z.array(z.string()),\n    steps: z.array(z.string()),\n  }),\n  experimental_telemetry: Moda.getVercelAITelemetry(),\n});\n```\n\n### Options\n\n```typescript\nModa.getVercelAITelemetry({\n  // Don't record prompts (for sensitive data)\n  recordInputs: false,\n\n  // Don't record completions (for sensitive data)\n  recordOutputs: false,\n\n  // Group telemetry by function (shown in dashboard)\n  functionId: 'my-chat-handler',\n\n  // Custom metadata (merged with Moda's conversation_id/user_id)\n  metadata: {\n    environment: 'production',\n    feature: 'customer-support',\n  },\n});\n```\n\n### What Gets Captured\n\nThe Vercel AI SDK emits rich telemetry spans that Moda captures automatically:\n\n| Span | Attributes |\n|------|------------|\n| `ai.generateText` / `ai.streamText` | Model, provider, prompt, response text, finish reason, usage tokens |\n| `ai.generateText.doGenerate` / `ai.streamText.doStream` | Per-step details: messages, tools, tool choice, response, provider metadata |\n| `ai.toolCall` | Tool name, tool call ID, arguments, result |\n| `ai.generateObject` / `ai.streamObject` | Schema, structured output, validation |\n| `ai.embed` / `ai.embedMany` | Embedding model, input values, dimensions |\n\n### Works With Any AI SDK Provider\n\nSince the telemetry is handled by the AI SDK core (not the provider), it works with any `@ai-sdk/*` provider:\n\n```typescript\nimport { anthropic } from '@ai-sdk/anthropic';\nimport { google } from '@ai-sdk/google';\nimport { mistral } from '@ai-sdk/mistral';\n\n// All of these work with the same telemetry config\nconst telemetry = Moda.getVercelAITelemetry();\n\nawait generateText({ model: anthropic('claude-3-5-sonnet-20241022'), ..., experimental_telemetry: telemetry });\nawait generateText({ model: google('gemini-1.5-pro'), ..., experimental_telemetry: telemetry });\nawait generateText({ model: mistral('mistral-large-latest'), ..., experimental_telemetry: telemetry });\n```\n\n## Streaming Support\n\nThe SDK fully supports streaming responses:\n\n```typescript\nconst stream = await openai.chat.completions.create({\n  model: 'gpt-4',\n  messages: [{ role: 'user', content: 'Count to 5' }],\n  stream: true,\n});\n\nfor await (const chunk of stream) {\n  process.stdout.write(chunk.choices[0]?.delta?.content || '');\n}\n// Streaming responses are automatically tracked\n```\n\n## Using with Sentry (or other OpenTelemetry SDKs)\n\nThe Moda SDK automatically detects and coexists with other OpenTelemetry-based SDKs like Sentry. When an existing TracerProvider is detected, Moda adds its SpanProcessor to the existing provider instead of creating a new one.\n\n### Sentry v8+ Integration\n\nSentry v8+ uses OpenTelemetry internally for tracing. Initialize Sentry first, then Moda:\n\n```typescript\nimport * as Sentry from '@sentry/node';\nimport { Moda } from 'moda-ai';\nimport OpenAI from 'openai';\n\n// 1. Initialize Sentry FIRST (sets up OpenTelemetry TracerProvider)\nSentry.init({\n  dsn: 'https://xxx@xxx.ingest.sentry.io/xxx',\n  tracesSampleRate: 1.0,\n});\n\n// 2. Initialize Moda SECOND (detects Sentry's provider automatically)\nawait Moda.init('moda_your_api_key', {\n  debug: true, // Shows: \"[Moda] Detected existing TracerProvider, adding Moda SpanProcessor to it\"\n});\n\n// 3. Use OpenAI normally - spans go to BOTH Sentry and Moda\nconst openai = new OpenAI();\nconst response = await openai.chat.completions.create({\n  model: 'gpt-4o-mini',\n  messages: [{ role: 'user', content: 'Hello!' }],\n});\n\n// 4. Cleanup - Moda shutdown preserves Sentry\nawait Moda.flush();\nawait Moda.shutdown(); // Only shuts down Moda's processor, Sentry continues working\n```\n\n### How It Works\n\nWhen Moda detects an existing TracerProvider (e.g., from Sentry):\n- Moda adds its SpanProcessor to the existing provider\n- Both SDKs receive the same spans with identical trace IDs\n- `Moda.shutdown()` only removes Moda's processor, preserving the other SDK\n- You can re-initialize Moda after shutdown\n\n### Expected Behavior\n\nWith `debug: true`, you should see:\n```\n[Moda] Detected existing TracerProvider, adding Moda SpanProcessor to it\n```\n\nYou should NOT see:\n```\nError: Attempted duplicate registration of tracer provider\n```\n\n### Supported SDKs\n\nThis coexistence works with any SDK that uses OpenTelemetry's TracerProvider:\n- Sentry v8+\n- Datadog APM\n- New Relic\n- Honeycomb\n- Custom OpenTelemetry setups\n\n### Advanced: Standalone Provider (bypasses Sentry sampling)\n\nIf Sentry filters out LLM spans (only shows HTTP/DB spans), use `Moda.createModaProvider` to create a separate provider that bypasses Sentry's sampling:\n\n```javascript\n// instrument.js - load AFTER Sentry.init()\nimport { Moda } from 'moda-ai';\n\nif (process.env.MODA_API_KEY) {\n  // Create Moda's own provider (doesn't affect Sentry)\n  Moda.createModaProvider({ apiKey: process.env.MODA_API_KEY });\n\n  // Register OpenAI/Anthropic instrumentations\n  Moda.registerInstrumentations();\n}\n```\n\nThis approach:\n- ✅ Bypasses Sentry's span sampling/filtering\n- ✅ Sentry continues working normally for HTTP/DB/errors\n- ✅ Moda receives all LLM spans independently\n- ✅ Two separate pipelines, no interference\n\n## Configuration Options\n\n```typescript\nModa.init('moda_api_key', {\n  // Base URL for telemetry ingestion\n  baseUrl: 'https://moda-ingest.modas.workers.dev/v1/traces',\n\n  // Environment name (shown in dashboard)\n  environment: 'production',\n\n  // Enable/disable the SDK\n  enabled: true,\n\n  // Enable debug logging\n  debug: false,\n\n  // Batch size for telemetry export\n  batchSize: 100,\n\n  // Flush interval in milliseconds\n  flushInterval: 5000,\n\n  // Deployed version, e.g. the git commit (exported as service.version)\n  serviceVersion: process.env.GIT_SHA,\n});\n```\n\n## API Reference\n\n### Moda Object\n\n```typescript\n// Initialize the SDK\nModa.init(apiKey: string, options?: ModaInitOptions): void\n\n// Force flush pending telemetry\nModa.flush(): Promise<void>\n\n// Shutdown and release resources\nModa.shutdown(): Promise<void>\n\n// Check initialization status\nModa.isInitialized(): boolean\n\n// Vercel AI SDK integration\nModa.getVercelAITelemetry(options?: GetVercelAITelemetryOptions): VercelAITelemetryConfig\n\n// Property-style context (recommended)\nModa.conversationId: string | null  // get/set\nModa.userId: string | null          // get/set\n\n// Method-style context (also supported)\nModa.setConversationId(id: string): void\nModa.clearConversationId(): void\nModa.setUserId(id: string): void\nModa.clearUserId(): void\n```\n\n### Context Functions\n\n```typescript\nimport { withConversationId, withUserId, withContext } from 'moda-ai';\n\n// Scoped conversation ID\nawait withConversationId('conv_123', async () => {\n  // All LLM calls here use 'conv_123'\n});\n\n// Scoped user ID\nawait withUserId('user_456', async () => {\n  // All LLM calls here are associated with 'user_456'\n});\n\n// Both at once\nawait withContext('conv_123', 'user_456', async () => {\n  // ...\n});\n```\n\n`withSessionKind(kind, callback)` tags every LLM call inside the callback with\n`moda.session.kind` (for example `'heartbeat'` for a scheduled turn).\n`withLLMCall({ vendor, type, sessionKind })` sets it for one call and overrides\nthe scoped value. `createAI7Telemetry` accepts `sessionKind` and `serviceVersion`\nlike the Think helper.\n\n### Utility Functions\n\n```typescript\nimport { computeConversationId, generateRandomConversationId } from 'moda-ai';\n\n// Compute conversation ID from messages (same algorithm SDK uses)\nconst id = computeConversationId(messages, systemPrompt);\n\n// Generate a random conversation ID\nconst randomId = generateRandomConversationId();\n```\n\n## Graceful Shutdown\n\nAlways flush before your application exits:\n\n```typescript\nprocess.on('SIGTERM', async () => {\n  await Moda.flush();\n  await Moda.shutdown();\n  process.exit(0);\n});\n```\n\n## Requirements\n\n- Node.js >= 18.0.0\n- TypeScript >= 5.0 (for type definitions)\n\n## Peer Dependencies\n\nInstall the LLM clients you want to use:\n\n```bash\n# For OpenAI (auto-instrumented)\nnpm install openai\n\n# For Anthropic (auto-instrumented)\nnpm install @anthropic-ai/sdk\n\n# For Vercel AI SDK (use with Moda.getVercelAITelemetry())\nnpm install ai @ai-sdk/openai    # or @ai-sdk/anthropic, @ai-sdk/google, etc.\n```\n\n## License\n\nMIT\n## AI SDK 7 (Node and Workers)\n\nUse `moda-ai/ai7` (SDK 1.16.0+) with `ai` 7 and `@ai-sdk/otel` 1.x.\nThis integration works without Think and supports `generateText` and\n`streamText`, including their model and tool calls.\n\n```typescript\nimport { createAI7Telemetry } from 'moda-ai/ai7';\nimport { generateText } from 'ai';\n\nconst moda = createAI7Telemetry({\n  apiKey: process.env.MODA_API_KEY!,\n  conversationId: 'your-session-id',\n  recordInputs: true,\n  recordOutputs: true,\n});\n\nawait generateText({ model, prompt: 'Hello', telemetry: moda.telemetry });\nawait moda.flush(); // Explicitly surfaces delivery failures.\n```\n\nKeep your existing provider/model. For streaming, consume the stream before\nthe explicit final flush. An explicit `conversationId` groups calls into your\nsession; without one each top-level AI7 call gets its own conversation. Turn\nidentity and start time are tracked separately for every call, including when\nthe helper is reused. Both recording options default to off. User identity,\nprompt-lockfile attribution, endpoint override and error callbacks are shared\nwith the Think helper below.\n\n`fetch` optionally supplies a transport such as\n`(url, init) => env.MODA_INGEST.fetch(new Request(url, init))` for a Cloudflare\nservice binding. This is needed for same-zone Worker-to-Worker routing on\n`workers.dev`; ordinary deployments use native fetch by default.\n\nBoth entry points use the same AI7 hooks, OTLP JSON exporter, retry policy and\nflush lifecycle. They do not initialize Node auto-instrumentation or register\na global provider. Existing direct OpenAI/Anthropic and AI SDK <=6 integrations\nkeep their existing APIs. The package's root entry point does not import AI7.\n\n## Model calls outside the AI SDK (Workers)\n\nThe root entry's `withLLMCall` and context helpers rely on Node's tracer\nprovider and protobuf exporter, which do not run in Cloudflare Workers.\n`moda-ai/workers` (SDK 1.19.0+) has the same API over the Workers-safe OTLP\nJSON transport. Keep `nodejs_compat` on.\n\n```typescript\nimport { init, withContext, withLLMCall, flushInBackground } from 'moda-ai/workers';\n\n// Once per request, before calls made outside a Think turn (cron, queues, background jobs):\ninit({ apiKey: env.MODA_API_KEY });\n\nawait withContext(conversationId, userId, () =>\n  withLLMCall({ vendor: 'openrouter', type: 'chat' }, async ({ span }) => {\n    span.reportRequest({ model, messages });\n    const data = await (await fetch(url, { method: 'POST', body: JSON.stringify({ model, messages }) })).json();\n    span.reportResponse({ model: data.model, usage: data.usage, completions: data.choices });\n    return data;\n  }));\nflushInBackground(ctx); // ctx.waitUntil(flush()), errors go to onExportError\n```\n\nFor background work, pass `serviceVersion` to `init` (exported as\n`service.version`) and wrap the job in `withSessionKind('heartbeat', ...)`,\nor pass `sessionKind` to `withLLMCall`. The call's value wins over the scoped\none. Moda keeps non-interactive kinds out of analytics, and an unset kind\nreads as interactive. Inside a Think turn, calls inherit the turn's\n`sessionKind` from `createThinkTelemetry`.\n\nProvider SDK clients and raw `fetch` calls can skip the callback: `traceFetch`\nreturns a `fetch` that traces OpenAI-style `/chat/completions` and\nAnthropic-style `/messages` requests (streamed or not) and passes everything\nelse through unchanged.\n\n```typescript\nimport { traceFetch } from 'moda-ai/workers';\n\nconst anthropic = new Anthropic({ apiKey, baseURL: 'https://openrouter.ai/api', fetch: traceFetch(customFetch) });\nconst response = await traceFetch()('https://openrouter.ai/api/v1/chat/completions', { method: 'POST', headers, body });\n// Background jobs: traceFetch(customFetch, { sessionKind: 'heartbeat' })\n```\n\nA call made inside a tool of a Think (or AI7) turn needs no `init()` or IDs:\nit joins that turn's conversation and turn ID, nests under the tool span, and\nis sent with the turn's own flush. Outside a turn, the conversation ID comes\nfrom `withConversationId`/`withContext`, then `reportRequest`, then a hash\nof the first messages, as in the root entry. Spans use the OpenTelemetry\nGenAI attributes that AI SDK 7 writes for Think model calls, so ingest reads\nboth the same way. Requests are recorded as reported; inline images are\nuploaded and referenced like other Workers spans.\n\n## Cloudflare Think (AI SDK 7)\n\nUse the `moda-ai/think` entry point (SDK 1.16.0+) with Think 0.18,\nAI SDK 7 and `@ai-sdk/otel` 1.x. Install the optional peer alongside the\nSDK using your package manager:\n\n```bash\nbun add moda-ai @ai-sdk/otel\n```\n\nCreate one telemetry object in each invocation of the existing Think\n`beforeTurn` hook. Keep the application's model, routes, tools, session\nmanagement and other hook overrides:\n\n```typescript\nimport { createThinkTelemetry } from 'moda-ai/think';\n\n// Inside the existing class that extends Think:\nasync beforeTurn() {\n  const moda = createThinkTelemetry({\n    apiKey: this.env.MODA_API_KEY,\n    recordInputs: true,\n    recordOutputs: true,\n    onExportError: error => console.error('Moda export failed', error.message),\n  });\n  return { telemetry: moda.telemetry };\n}\n```\n\nThis small adapter adds Think's session/turn identity to the shared AI7\nintegration. It includes only those two runtime context keys in telemetry.\nRetain the Worker's `nodejs_compat` flag for its OTel dependencies.\nThe default conversation ID comes from Think's runtime session; pass\n`conversationId` to use your app's own stable session ID and `userId` for\nuser attribution. `endpoint` accepts an ingest origin (including the CLI's\n`MODA_INGEST_URL`) or a full OTLP URL. A bare origin gets `/v1/traces` appended;\nan explicit path is preserved.\nPass `serviceVersion` (for example `env.GIT_SHA`) to record the deployed commit\nas the `service.version` resource attribute on every span. Moda's replay matches\na git commit (7 to 64 hex characters) to the harness registration built from it.\nAny other value, such as a Cloudflare version id, is kept on the trace, and replay\nthen uses the newest registration created before the turn.\n\nPass `sessionKind` to say what started the turn: `'interactive'` (a person wrote,\nthe default when unset) or a background kind such as `'heartbeat'`, `'cron'`,\n`'ritual'`, `'onboarding'`, `'call'` or `'background'`. Any string is accepted. It is\nexported as `moda.session.kind`. Moda keeps non-interactive turns out of analytics,\nproblem detection and conversation counts by default, and replay can still select\nthem. Create the telemetry object per turn, so each turn can set its own kind:\n\n```typescript\nasync beforeTurn(ctx) {\n  const moda = createThinkTelemetry({\n    apiKey: this.env.MODA_API_KEY,\n    serviceVersion: this.env.GIT_SHA ?? this.env.CF_VERSION_METADATA?.id,\n    sessionKind: sessionKindFor(this.name), // your mapping, e.g. by session id prefix\n  });\n  return { telemetry: moda.telemetry };\n}\n```\n\nPayload capture defaults to **off**. The two recording options opt into\nsystem instructions, messages, tool definitions, arguments and results.\nAfter `moda prompts sync`, import the generated lockfile at build time and\npass its `{ key, promptId, versionId }` entry as `prompt`. Keep your own\nrendering; a template version is not a complete model-context snapshot.\n\nThe helper flushes on AI SDK completion/abort. `flush()` rejects on failed\ndelivery, calls `onExportError`, and retains the batch for an explicit\nretry. AI SDK lifecycle hooks can swallow errors, so check this callback\nand explicitly await `flush()` when verifying onboarding. Export retries\nare bounded and keep span IDs. Pending data is in memory; it cannot survive\nabrupt isolate termination. The per-turn limit is 4096 spans. This path\nrequires AI SDK 7; use the existing Node helpers for older SDK versions.\n\n## Turn snapshots (Cloudflare Think)\n\n`moda-ai/turn-snapshot` sends a `moda_turn_snapshot.v1` record at the start of\neach Think turn so replays can rebuild the turn's inputs: the tools offered,\nfull MCP/Composio tool lists, memory recall, harness state and the deployed\ncommit. It needs `ai` (already a Think dependency) and works in Workers and\nNode 18+.\n\n```typescript\nimport { createTurnSnapshots } from 'moda-ai/turn-snapshot';\n\n// In the Think subclass constructor:\nthis.snapshots = createTurnSnapshots({\n  apiKey: env.MODA_API_KEY,\n  harness: 'my-agent',\n  commit: env.GIT_SHA, // wrangler deploy --var GIT_SHA:$GITHUB_SHA\n  storage: ctx.storage, // content-address cache and retry queue\n  stateArtifactKeys: ['activePage'], // user-authored content is always an artifact\n  onError: error => console.warn('Moda snapshot failed', error.message),\n});\n\nasync beforeTurn(ctx) {\n  const config = await this.existing(ctx); // existing logic, unchanged\n  try {\n    this.ctx.waitUntil(this.snapshots.capture({ ctx, config, conversationId: this.name, state: { plan, onboarding } }));\n  } catch {}\n  return config;\n}\n```\n\nCall `snapshots.recordToolList('mcp', serverName, tools)` wherever an MCP\n`tools/list` or Composio toolkit list is fetched, and\n`snapshots.recordRecall({ query, ids, scores })` in the recall path.\n\nBehavior:\n\n- `capture` reads `ctx`, `config` and `state` synchronously and returns at\n  once; hashing and I/O happen in the returned promise. No method throws and\n  no returned promise rejects; failures go to `onError` (default\n  `console.warn`). Nothing passed in is mutated.\n- Offered tools are `ctx.tools` merged with `config.tools`, filtered by\n  `config.activeTools`, with `offeredDirectly: true` and source `native` (or\n  `toolSource(name)`). Tools known only from recorded tool lists are added\n  with `offeredDirectly: false` and source `<provider>:<name>`. `schemaHash`\n  is the sha256 of canonical JSON `{ d: description, s: inputJsonSchema }`.\n- `turnId` is `ctx.requestId`; without it the snapshot is skipped. Recall is\n  sent with the next capture only; tool lists are kept until replaced.\n- Tool lists are always artifacts; a `state` field larger than 8 KB, or listed\n  in `stateArtifactKeys`, becomes `{ $artifact: { sha256 } }`. Replay reads tool\n  lists and state by that hash. Each file is sent as\n  `PUT /v1/files/<sha256>`, once per hash; concurrent turns share one upload.\n  Stored data is isolated by a hash of the normalized endpoint and API key.\n- Content whose upload has not finished is kept in bounded storage chunks for\n  24 hours in a paged queue; a failed batch rotates so later work can proceed.\n  The next `capture`, or `retryPending()` from an alarm, uploads it again. A\n  410, 413 or 422 is permanent: it is reported through `onError` and the content\n  leaves the queue.\n- Snapshots never exceed 64 KB. Over the cap, the helper drops `memory`, moves\n  inline `state` fields to artifacts (largest first), then truncates `tools`\n  and `toolLists`, recording what it removed in `state.$truncated`.\n- Canonical JSON is limited to 200 levels of nesting. State fields beyond\n  that limit are reported through `onError` and replaced with an error marker.\n- `toolListRetentionDays` (default 365), `stateRetentionDays` and\n  `mediaRetentionDays` (default 30), each 1-365, set only how often a file is\n  uploaded again: it is sent once per hash and again after half that many days.\n  They are not sent to Moda and do not change how long Moda stores a file.\n- Requests time out after `timeoutMs` (default 10 s) and are retried once on a\n  network error or 5xx. `endpoint` and `fetch` follow the tracing helpers.\n\n### Media\n\nA file that goes through a traced model call is captured automatically and\nneeds no call here. For any other file, upload it and put the returned block in\nthe message it belongs to:\n\n```typescript\nconst file = await this.snapshots.uploadMedia({ bytes, contentType: 'image/png', fileName: 'chart.png' });\nif (file) message.content.push(file);\n```\n\nThe block is `{ type: 'artifact_ref', sha256, mime_type, size_bytes, name? }`.\nThe file is stored once per content hash. A retryable failure still returns the\nblock, and the bytes stay queued for `retryPending()`. `uploadMedia` resolves to\n`undefined` when the file will not be stored: invalid input, a file over 16 MiB,\nor a permanent refusal, each reported through `onError`.\n\n## Media your agent stores or fetches (Cloudflare R2)\n\nTraces carry links and keys, never the bytes. Moda can still show them, and serve them in replays, if your Worker hands each file to Moda once. You don't need a separate Worker or a hook on every `put`: R2 event notifications feed a queue, and you add one branch to the `queue()` handler you already have.\n\n```bash\nwrangler queues create moda-media\nwrangler queues create moda-media-dlq\n# One rule per prefix that holds user or agent media:\nwrangler r2 bucket notification create <bucket> --event-type object-create --queue moda-media --prefix \"users/\"\nwrangler r2 bucket notification create <bucket> --event-type object-create --queue moda-media --prefix \"messages/\"\n```\n\n```jsonc\n// wrangler.jsonc\n\"queues\": {\n  \"consumers\": [\n    { \"queue\": \"moda-media\", \"max_batch_size\": 10, \"max_batch_timeout\": 5, \"max_retries\": 5, \"dead_letter_queue\": \"moda-media-dlq\" }\n  ]\n}\n```\n\n```ts\nimport { r2MediaHandler, captureFetchedMedia } from 'moda-ai/media';\n\nexport default {\n  async queue(batch, env, ctx) {\n    if (batch.queue === 'moda-media') {\n      await r2MediaHandler(batch, env.R2_BUCKET, {\n        apiKey: env.MODA_API_KEY,\n        prefixes: ['users/', 'messages/'],\n        parseKey: (key) => ({ endUserId: key.split('/')[1] }), // users/<id>/..., messages/<id>/...\n      });\n      return;\n    }\n    // ...your other queues\n  },\n};\n```\n\n- **Acknowledgement.** `r2MediaHandler` acknowledges each message once it is handled. It asks for redelivery, with backoff, only when Moda or R2 was briefly unavailable. It never throws.\n- **Repeats.** A redelivered notification, or several copies of one in a batch, uploads the file once. Files are stored by SHA-256.\n- **What it ignores.** Deletes, keys outside `prefixes`, and keys for which `parseKey` returns `null` are skipped.\n- **Large objects.** An object over `maxBytes` (25 MB by default, at most 95 MB) is recorded by key only, without its bytes. Larger objects are hashed while they stream (`crypto.DigestStream`), so memory stays flat.\n\nFor media fetched from outside URLs, for example in an image tool, call `captureFetchedMedia` after the fetch. Moda files it under a hash of the URL's origin and path. The query string is never sent, because signed links are bearer tokens.\n\n```ts\nconst response = await fetch(url);\nctx.waitUntil(captureFetchedMedia(url, response.clone(), { apiKey: env.MODA_API_KEY, endUserId }));\n```\n\nThese files are your users' media. Turn this on only where your terms and consent cover sending them to Moda. Use `prefixes` and `parseKey` to leave out anything they don't cover.\n\n## Reported state writes (`moda-ai/state`)\n\nReplays rebuild your agent's own state (memories, calendar, rules, files, config) as it was at the turn being replayed. Moda can infer it from traces, but it is exact when you report each write yourself, at the storage helper every writer goes through.\n\n```typescript\nimport { waitUntil } from 'cloudflare:workers'; // Workers only; omit on Node\nimport { createStateWriter } from 'moda-ai/state';\n\nconst state = createStateWriter({\n  apiKey: env.MODA_API_KEY,\n  waitUntil,                       // or ctx.waitUntil.bind(ctx)\n  stores: ['memories', 'calendar_posts', 'files', 'config'], // optional allowlist\n  redact: write => write,          // optional: change or drop (return null) a write before it leaves\n});\n\n// After the write has landed:\nstate.recordStateWrite({ store: 'memories', op: 'upsert', key: memory.id, value: memory, userId });\nstate.recordStateWrite({ store: 'calendar_posts', op: 'update', key: post.id, fields: { status: 'scheduled' }, userId });\nstate.recordStateWrite({ store: 'files', op: 'upsert', key: '/USER.md', value: text, userId });\nstate.recordStateWrite({ store: 'config', op: 'update', key: 'tenant', fields: { plan: 'pro' } }); // no userId: shared state\nstate.recordStateWrite({ store: 'memories', op: 'delete', key: memory.id, userId });\n```\n\n| Field | |\n|---|---|\n| `store`, `key` | The collection and the row id in it. Use the names your replay seed expects. |\n| `op` | `create` / `upsert` (with the whole row in `value`), `update` (changed `fields`), `delete`. |\n| `before` | Optional pre-image on an `update`, so a replay can fill fields the update did not touch. |\n| `userId` | The end user the row belongs to (the same id as on your traces). Omit for state shared by every user. |\n| `conversationId`, `traceId` | Optional links to the turn. |\n| `at` | When the write landed (default now). |\n| `writeId` | Idempotency id (generated). Re-sending a write with the same id (and the same `at`) stores it once. |\n| `sequence` | Set by the writer (a per-writer counter), so writes in the same millisecond apply in order. |\n\n- **Never throws, never blocks.** Writes are queued and sent in batches (`/v1/state-writes`); failures go to `onError`. On Node, `await flushStateWrites()` (or `writer.flush()`) before the process exits.\n- **Inside a traced turn** (an active, recording span from a Moda tracer, such as the Think/AI SDK 7 integration) a write becomes a `moda.state_write` event on that span instead, so it is linked to the turn and exported with the trace. Under another tracer (Sentry, your own) it goes over HTTP carrying that span's trace id; set `spanEvents: true` (or a predicate) only if that tracing exports to Moda.\n- **Secrets are never sent:** fields named like tokens, secrets, passwords, API keys, cookies or credentials are removed at any depth (`dropKeys`, default `DEFAULT_SECRET_KEYS`). Use `stores` and `redact` to send only what your prompt renders.\n- **Limits:** `value` + `fields` + `before` at most 64 KiB per write (larger writes are dropped and reported); 500 writes per request.\n- A module-level `configureStateWrites(options)` + `recordStateWrite(write)` pair is available when passing a writer around is awkward.\n","readmeFilename":"README.md"}