{"_id":"@amsterdamdatalabs/traces","_rev":"6-d395d0c0e92195b1b12d420e30b2aac7","name":"@amsterdamdatalabs/traces","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.0":{"name":"@amsterdamdatalabs/traces","version":"0.1.0","license":"UNLICENSED","_id":"@amsterdamdatalabs/traces@0.1.0","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"dist":{"shasum":"dd810f08e491bccd7c02b3f83deb19bd2ec99d69","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.0.tgz","fileCount":41,"integrity":"sha512-jDWpUChjq/RRafVjOxRMWfdjQNmk4psqoJZ1e1HIsTerDa51iZSdhMZ942FEst3fKuyreP7W17Eh3J28y9emWA==","signatures":[{"sig":"MEQCIHQQ8pscmjbjyngG1BhmuCho/PUH9TMZitt4JsT+Z3K/AiAMhDZ2cRbwjbDtu6Y8aNkLtWrLXGOMtG19+ckEUvLePw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44277},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./emit":{"types":"./dist/emit/emit.d.ts","import":"./dist/emit/emit.js"},"./payloads":{"types":"./dist/payloads/index.d.ts","import":"./dist/payloads/index.js"},"./conventions":{"types":"./dist/conventions/index.d.ts","import":"./dist/conventions/index.js"}},"gitHead":"29fc85a12fdff8e52ab391cd435116e1ae3a4b37","scripts":{"dev":"tsc --watch","lint":"oxlint src/","build":"rm -rf dist && tsc"},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"_npmVersion":"10.9.7","description":"Shared OpenInference tracing types and emit for enact-os packages","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"oxlint":"^0.13.0","typescript":"^5.4.5","@types/node":"^25.9.0"},"_npmOperationalInternal":{"tmp":"tmp/traces_0.1.0_1779142308677_0.6399673147356157","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@amsterdamdatalabs/traces","version":"0.1.1","license":"UNLICENSED","_id":"@amsterdamdatalabs/traces@0.1.1","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"dist":{"shasum":"8298d07e6c3969f138c9121079860466bda264bd","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.1.tgz","fileCount":45,"integrity":"sha512-SF7XWRiLFClyw1xNypum03WtTB6jigbY2cISkfeUWzi8OfSKkKN7nmzpmBTAeusJQSOLWTI7Pc8SXvAN/Kj0ig==","signatures":[{"sig":"MEUCICt9QuIPpeLfCIW9hQJ6sUngJei5E5MNASpLqhwc6VVbAiEAjyXX/I8qf+WFti7vdPSeA4K4AHvB5kwaNJpL9yzQkb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64203},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./emit":{"types":"./dist/emit/emit.d.ts","import":"./dist/emit/emit.js"},"./payloads":{"types":"./dist/payloads/index.d.ts","import":"./dist/payloads/index.js"},"./conventions":{"types":"./dist/conventions/index.d.ts","import":"./dist/conventions/index.js"}},"gitHead":"e5daca794a44f3406337c589efda598163d06fb9","scripts":{"dev":"tsc --watch","lint":"oxlint src/","test":"jest","build":"rm -rf dist && tsc"},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"_npmVersion":"10.9.8","description":"Shared OpenInference tracing types and emit for enact-os packages","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","oxlint":"^0.13.0","ts-jest":"^29.4.11","typescript":"^5.4.5","@types/jest":"^30.0.0","@types/node":"^25.9.0"},"_npmOperationalInternal":{"tmp":"tmp/traces_0.1.1_1781819667528_0.46051081855142617","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@amsterdamdatalabs/traces","version":"0.1.3","license":"UNLICENSED","_id":"@amsterdamdatalabs/traces@0.1.3","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"dist":{"shasum":"928f60c7c9e2099b1ff8c4aa31597971c2c67d0d","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.3.tgz","fileCount":45,"integrity":"sha512-59hrIyREPf6sKarbPCIqGLSThSwSX+gQE9ysj2HtoQezzPoq6UWVvI0Y7NiH7Amqx+ocp3cfCZKeSTIuBh7CbQ==","signatures":[{"sig":"MEQCIDUarwtoBc9R4zsYguJP7FTeRmBTtAjcdSeB6dYpPTrHAiBfrF2A80QLGqKfroXkrtp9flEXA1Yk9qmAK8jlpCCegw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64203},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./emit":{"types":"./dist/emit/emit.d.ts","import":"./dist/emit/emit.js"},"./payloads":{"types":"./dist/payloads/index.d.ts","import":"./dist/payloads/index.js"},"./conventions":{"types":"./dist/conventions/index.d.ts","import":"./dist/conventions/index.js"}},"gitHead":"ebc6cec0b7df52d52396ded1fc26b2731d435a27","scripts":{"dev":"tsc --watch","lint":"oxlint src/","test":"jest","build":"rm -rf dist && tsc"},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"_npmVersion":"10.9.8","description":"Shared OpenInference tracing types and emit for enact-os packages","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","oxlint":"^0.13.0","ts-jest":"^29.4.11","typescript":"^5.4.5","@types/jest":"^30.0.0","@types/node":"^25.9.0"},"_npmOperationalInternal":{"tmp":"tmp/traces_0.1.3_1781894047442_0.9703407841843761","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@amsterdamdatalabs/traces","version":"0.1.4","license":"UNLICENSED","_id":"@amsterdamdatalabs/traces@0.1.4","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"dist":{"shasum":"7eb9201d61ca53315f438f0083b8b39af8e1ab37","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.4.tgz","fileCount":45,"integrity":"sha512-DsAWa+ucRO9ZO70/IbVZOCsJKo0cY6jz7tKBLjXcL1NQMGynPdECQJdhAZ+m7Ii2PIRLvCSEMvhNTM2QNNSiag==","signatures":[{"sig":"MEQCIDNslNxQ+T81LXxY9ANufI+8zRiph6LoV0I0z/nZuGDQAiBcmBE4ZSvCuZ3Iqaa0JQi+ncBbgssHgbJvZVUextd88g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64203},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./emit":{"types":"./dist/emit/emit.d.ts","import":"./dist/emit/emit.js"},"./payloads":{"types":"./dist/payloads/index.d.ts","import":"./dist/payloads/index.js"},"./conventions":{"types":"./dist/conventions/index.d.ts","import":"./dist/conventions/index.js"}},"gitHead":"fa1b93e4f8a80a8431f32b3b54d326759f5accf6","scripts":{"dev":"tsc --watch","lint":"oxlint src/","test":"jest","build":"rm -rf dist && tsc"},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"_npmVersion":"10.9.8","description":"Shared OpenInference tracing types and emit for enact-os packages","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","oxlint":"^0.13.0","ts-jest":"^29.4.11","typescript":"^5.4.5","@types/jest":"^30.0.0","@types/node":"^25.9.0"},"_npmOperationalInternal":{"tmp":"tmp/traces_0.1.4_1781900023008_0.2909987094296995","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@amsterdamdatalabs/traces","version":"0.1.5","license":"UNLICENSED","_id":"@amsterdamdatalabs/traces@0.1.5","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"dist":{"shasum":"205a1193177ab9e802e6e377dcba0a18bbee7a3b","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.5.tgz","fileCount":45,"integrity":"sha512-mVS3sRSII/3jHVutZ4UHRKco366rakYF6fDdviD8YOzIfMyGozdUhArpj634S7R3uaQZzojT1z2tv4wA+oVs8Q==","signatures":[{"sig":"MEQCIH67KJAL4FveZ10Y3hWhNtIWoMvxv58lYHDPuoAeYQPVAiBnU8E1XJY1au+lgfgCI1s/9Eq+8TX0UXwCUhqvV5edOg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64319},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"},"./emit":{"types":"./dist/emit/emit.d.ts","import":"./dist/emit/emit.js"},"./payloads":{"types":"./dist/payloads/index.d.ts","import":"./dist/payloads/index.js"},"./conventions":{"types":"./dist/conventions/index.d.ts","import":"./dist/conventions/index.js"}},"gitHead":"e394ca55a99454df2f0afa682338191948c0318c","scripts":{"dev":"tsc --watch","lint":"oxlint src/","test":"jest","build":"rm -rf dist && tsc"},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"_npmVersion":"10.9.8","description":"Shared OpenInference tracing types and emit for enact-os packages","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.4.2","oxlint":"^0.13.0","ts-jest":"^29.4.11","typescript":"^5.4.5","@types/jest":"^30.0.0","@types/node":"^25.9.0"},"_npmOperationalInternal":{"tmp":"tmp/traces_0.1.5_1781916414007_0.35140328361951156","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@amsterdamdatalabs/traces","version":"0.1.6","description":"Shared OpenInference tracing types and emit for enact-os packages","license":"UNLICENSED","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js","types":"./dist/index.d.ts"},"./conventions":{"import":"./dist/conventions/index.js","types":"./dist/conventions/index.d.ts"},"./payloads":{"import":"./dist/payloads/index.js","types":"./dist/payloads/index.d.ts"},"./emit":{"import":"./dist/emit/emit.js","types":"./dist/emit/emit.d.ts"}},"scripts":{"build":"rm -rf dist && tsc","dev":"tsc --watch","lint":"oxlint src/","test":"jest"},"dependencies":{"@arizeai/openinference-semantic-conventions":"^2.3.0"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"^25.9.0","jest":"^30.4.2","oxlint":"^0.13.0","ts-jest":"^29.4.11","typescript":"^5.4.5"},"_id":"@amsterdamdatalabs/traces@0.1.6","gitHead":"8dd8f0bd8230db3b242e8a916536a60599a45aee","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-8uSFHhkcaCiHQyPCNUWWKdzIZMzofgWOQfKCiolVgHZ/SuRqwiBjcZkw7aXbfQPhzIW4o/j5nD6E7rB92ruHKQ==","shasum":"e25d6460bc786fde2074f011d4905312d64543a5","tarball":"https://registry.npmjs.org/@amsterdamdatalabs/traces/-/traces-0.1.6.tgz","fileCount":45,"unpackedSize":64319,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHWlTYh0ZDj/O0Tqw1qRUiw///YcY0l4B4k2KhTEqJ61AiBAjhGugz4H6E++U0k73PUckGWoiFy+XZIUD4wvTXP0xw=="}]},"_npmUser":{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"},"directories":{},"maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/traces_0.1.6_1782139864090_0.9596975239347838"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T22:11:48.527Z","modified":"2026-06-22T14:51:04.372Z","0.1.0":"2026-05-18T22:11:48.826Z","0.1.1":"2026-06-18T21:54:27.652Z","0.1.3":"2026-06-19T18:34:07.584Z","0.1.4":"2026-06-19T20:13:43.151Z","0.1.5":"2026-06-20T00:46:54.161Z","0.1.6":"2026-06-22T14:51:04.239Z"},"license":"UNLICENSED","description":"Shared OpenInference tracing types and emit for enact-os packages","maintainers":[{"name":"tarun.rana","email":"tarun.rana@amsterdamdatalabs.com"}],"readme":"<p align=\"center\">\n  <strong>@amsterdamdatalabs/traces</strong>\n</p>\n<p align=\"center\">\n  Shared OpenInference tracing types, span attribute constants, and event emit for enact-os packages\n</p>\n\n## What is it?\n\n`@amsterdamdatalabs/traces` is the canonical tracing contract for the enact-os observability stack. It provides:\n\n- **Payload schemas** — typed event payloads for every span kind: LLM calls, tool calls, memory reads/writes, proc-tap, agent lifecycle, hook-fired, cache hits, and hand runs\n- **Span attribute constants** — `enact.*` and `llm.*` extension attributes on top of the OpenInference semantic conventions\n- **Emit** — a zero-dependency `emitEvent()` that writes NDJSON to the watchdog dir and publishes to Apache Iggy in parallel\n\nUsed by `enact-gateway`, `enact-factory`, `enact-wiki`, `enact-agent`, and `enact-watchdog`.\n\n## Installation\n\n```bash\nnpm install @amsterdamdatalabs/traces\n```\n\n## Usage\n\n### Emit a trace event\n\n```typescript\nimport { emitEvent } from '@amsterdamdatalabs/traces/emit';\nimport type { EnactRawV1Event } from '@amsterdamdatalabs/traces';\n\nconst event: EnactRawV1Event = {\n  schema: 'enact.raw.v1',\n  ts: Date.now(),\n  span_kind: 'llm_call',\n  payload: { /* ... */ },\n};\n\nawait emitEvent(event, { ndjsonFile: 'factory-events.ndjson' });\n```\n\n### Use span attribute constants\n\n```typescript\nimport {\n  ENACT_ROUTING_TIER,\n  ENACT_PROVIDER,\n  LLM_ENDPOINT_KEY,\n} from '@amsterdamdatalabs/traces/conventions';\n\nspan.setAttribute(ENACT_ROUTING_TIER, 'standard');\nspan.setAttribute(ENACT_PROVIDER, 'anthropic');\n```\n\n### Use typed payloads\n\n```typescript\nimport type { LlmCallPayload } from '@amsterdamdatalabs/traces/payloads';\n\nconst payload: LlmCallPayload = {\n  model: 'claude-sonnet-4-6',\n  input_tokens: 1200,\n  output_tokens: 340,\n};\n```\n\n## Sub-path exports\n\n| Import | Contents |\n|--------|----------|\n| `@amsterdamdatalabs/traces` | All types, payloads, conventions, and emit |\n| `@amsterdamdatalabs/traces/conventions` | `enact.*` and `llm.*` span attribute constants |\n| `@amsterdamdatalabs/traces/payloads` | Typed payload schemas for each span kind |\n| `@amsterdamdatalabs/traces/emit` | `emitEvent()` — NDJSON + Iggy publish |\n\n## Environment variables\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `ENACT_WATCHDOG_DIR` | `.enact/watchdog` | Directory for NDJSON output files |\n| `IGGY_HTTP_URL` | `http://127.0.0.1:43214` | Apache Iggy HTTP endpoint |\n| `IGGY_HTTP_ACCESS_TOKEN` | — | Bearer token for Iggy auth |\n| `IGGY_HTTP_USERNAME` | `iggy` | Iggy username (if no token) |\n| `IGGY_HTTP_PASSWORD` | `iggy` | Iggy password (if no token) |\n| `ENACT_OBSERVABILITY_DEBUG` | — | Log emit errors to stderr |\n\n## License\n\nProprietary — Copyright © 2026 Amsterdam Data Labs.\n","readmeFilename":"README.md"}