{"_id":"@ar-agents/aduana","_rev":"4-0e620c5f6133c58ab99e81f0982f7f49","name":"@ar-agents/aduana","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@ar-agents/aduana","version":"0.2.0","keywords":["aduana","arca","afip","maria","ncm","comercio-exterior","ar-agents","argentina","ai-sdk","vercel-ai","agent","trade"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/aduana@0.2.0","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/aduana","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"489525ed9f15ac8bf7d75a29bc3a94703ec22743","tarball":"https://registry.npmjs.org/@ar-agents/aduana/-/aduana-0.2.0.tgz","fileCount":12,"integrity":"sha512-FS/lSvawRJhnZLpk0L54v2b8STYRcChiPAuft6DiGD9anM2WBsb89SFA2B2AxBiuxf+vGsSj0DBVELMyYPRPOA==","signatures":[{"sig":"MEUCIQCGGal1un/4VM/UXtugo9P96hnv/Ec2TnizXRWvqjrzLgIgIuxwYWOc5pDRJM9+mMbId4svQM75rIQlZJ6NpZcuu00=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2faduana@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":59491},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-aduana-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/066a17fd7b2939725c43e8c27e143a0f/ar-agents-aduana-0.2.0.tgz","_integrity":"sha512-FS/lSvawRJhnZLpk0L54v2b8STYRcChiPAuft6DiGD9anM2WBsb89SFA2B2AxBiuxf+vGsSj0DBVELMyYPRPOA==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/aduana"},"_npmVersion":"10.8.2","description":"ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock ","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@ar-agents/core":"^0.1.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aduana_0.2.0_1779729824688_0.7083322188616923","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@ar-agents/aduana","version":"0.2.1","keywords":["aduana","arca","afip","maria","ncm","comercio-exterior","ar-agents","argentina","ai-sdk","vercel-ai","agent","trade"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/aduana@0.2.1","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/aduana","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"0aef32952bda89328269356ac02637f19cd8ea8b","tarball":"https://registry.npmjs.org/@ar-agents/aduana/-/aduana-0.2.1.tgz","fileCount":12,"integrity":"sha512-1C7CEh9USJUbPKvTjLmxZqODULdbGe5koayL8bN9opduJK3Kb9P+3oSJYqnOL1fw81SUxszvasuB4VH0MV2NMw==","signatures":[{"sig":"MEUCIFcsyUKCwogD8hKIg1fxouAU5TUWiyDVIuioNTZQaeyNAiEAlI3t0dGRzo6SdmqnZPfudPzPBFiQ2xDCRENA3xxqHFg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2faduana@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60244},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-aduana-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/c4d847da6cc5b324a2e389a1b78ff93d/ar-agents-aduana-0.2.1.tgz","_integrity":"sha512-1C7CEh9USJUbPKvTjLmxZqODULdbGe5koayL8bN9opduJK3Kb9P+3oSJYqnOL1fw81SUxszvasuB4VH0MV2NMw==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/aduana"},"_npmVersion":"10.8.2","description":"ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock ","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@ar-agents/core":"^0.1.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.175","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aduana_0.2.1_1781280161286_0.9690963154120871","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ar-agents/aduana","version":"0.2.2","keywords":["aduana","arca","afip","maria","ncm","comercio-exterior","ar-agents","argentina","ai-sdk","vercel-ai","agent","trade"],"author":{"name":"Nazareno Clemente","email":"naza@helloastro.co"},"license":"MIT","_id":"@ar-agents/aduana@0.2.2","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/aduana","bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"dist":{"shasum":"6fd980465b944c0f53ff9fbe8ce6d797f4ac12d0","tarball":"https://registry.npmjs.org/@ar-agents/aduana/-/aduana-0.2.2.tgz","fileCount":12,"integrity":"sha512-mfx3hcBsJminJB9GUjiYkyI1tFfuSm/yxpzr2Rp/a/uGBC47uuvyTXhp2s8anpKWMNgiIz0o3GF++thYJliCVQ==","signatures":[{"sig":"MEUCIDy19LMsmeUP/MYWYdU4sjxWr+w/YFh6QVeSoWjrnhEKAiEAj3lw0nWGYB9D1TG/3IYtWnb+dBYRr9NidBfuGuzFebQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2faduana@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60124},"main":"./dist/index.cjs","type":"module","_from":"file:ar-agents-aduana-0.2.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"funding":{"url":"https://github.com/sponsors/naza00000","type":"github"},"scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","validate":"publint && attw --pack .","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"_resolved":"/tmp/5632462e07acdc49f464a4095ae7fa4e/ar-agents-aduana-0.2.2.tgz","_integrity":"sha512-mfx3hcBsJminJB9GUjiYkyI1tFfuSm/yxpzr2Rp/a/uGBC47uuvyTXhp2s8anpKWMNgiIz0o3GF++thYJliCVQ==","repository":{"url":"git+https://github.com/ar-agents/ar-agents.git","type":"git","directory":"packages/aduana"},"_npmVersion":"10.9.8","description":"ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock ","directories":{},"_nodeVersion":"22.23.0","dependencies":{"@ar-agents/core":"^0.3.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"ai":"^7.0.0","zod":"^4.4.3","tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.9.3","@types/node":"^20.19.39"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/aduana_0.2.2_1782899908567_0.673864727617959","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ar-agents/aduana","version":"0.3.0","description":"ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock ","keywords":["aduana","arca","afip","maria","ncm","comercio-exterior","ar-agents","argentina","ai-sdk","vercel-ai","agent","trade"],"license":"MIT","author":{"name":"Nazareno Clemente","email":"naza@naza.ar"},"funding":{"type":"github","url":"https://github.com/sponsors/naza00000"},"homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/aduana","repository":{"type":"git","url":"git+https://github.com/ar-agents/ar-agents.git","directory":"packages/aduana"},"bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./tools.manifest.json":"./tools.manifest.json"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0"},"devDependencies":{"@types/node":"^20.19.39","ai":"^7.0.0","tsup":"^8.3.5","typescript":"^5.9.3","vitest":"^2.1.8","zod":"^4.4.3"},"publishConfig":{"access":"public","provenance":true},"engines":{"node":">=20.0.0"},"dependencies":{"@ar-agents/core":"^0.4.0"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","typecheck":"tsc --noEmit","validate":"publint && attw --pack .","clean":"rm -rf dist"},"_id":"@ar-agents/aduana@0.3.0","_integrity":"sha512-e5nQi+X/XpDjY3b1UkIXetDujoq9uM69MJYE1fmkZubC3+0+Qdp8RNwLe8/0WuPbmlBzyvXtpRSDx8tc3YIDZw==","_resolved":"/tmp/6029b7bc9057beb461b7cb6c1fa76135/ar-agents-aduana-0.3.0.tgz","_from":"file:ar-agents-aduana-0.3.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-e5nQi+X/XpDjY3b1UkIXetDujoq9uM69MJYE1fmkZubC3+0+Qdp8RNwLe8/0WuPbmlBzyvXtpRSDx8tc3YIDZw==","shasum":"f8ac04884a232353748c6d11263b8ddb7d84a4f8","tarball":"https://registry.npmjs.org/@ar-agents/aduana/-/aduana-0.3.0.tgz","fileCount":12,"unpackedSize":74802,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ar-agents%2faduana@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDhMbLz5HPMB7+VuZf3TDEAc1dmBY2/pyXBwHy9ZvyswQIgQC/oYzAkad57J5l/+KLMZCgZKQ8EE3Fk9G6UGhThddE="}]},"_npmUser":{"name":"naza-ar","email":"clementenaza@gmail.com"},"directories":{},"maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aduana_0.3.0_1783077258768_0.45049155121280027"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T17:23:44.517Z","modified":"2026-07-03T11:14:19.238Z","0.2.0":"2026-05-25T17:23:44.845Z","0.2.1":"2026-06-12T16:02:41.433Z","0.2.2":"2026-07-01T09:58:28.709Z","0.3.0":"2026-07-03T11:14:18.912Z"},"bugs":{"url":"https://github.com/ar-agents/ar-agents/issues"},"author":{"name":"Nazareno Clemente","email":"naza@naza.ar"},"license":"MIT","homepage":"https://github.com/ar-agents/ar-agents/tree/main/packages/aduana","keywords":["aduana","arca","afip","maria","ncm","comercio-exterior","ar-agents","argentina","ai-sdk","vercel-ai","agent","trade"],"repository":{"type":"git","url":"git+https://github.com/ar-agents/ar-agents.git","directory":"packages/aduana"},"description":"ARCA Aduana (formerly AFIP Aduana / María) agent toolkit for the Vercel AI SDK 6. Look up import/export declarations by SUSI/KIM/OM number, status of an in-flight despacho, and the publicly-available tariff nomenclature (NCM). Adapter pattern: typed mock ","maintainers":[{"name":"naza-ar","email":"clementenaza@gmail.com"}],"readme":"# @ar-agents/aduana\n\n> ARCA Aduana (formerly AFIP / María) as drop-in tools for the Vercel AI SDK.\n\nLook up Argentine customs declarations by SUSI / KIM / OM number, check the\nstatus of an in-flight despacho, and resolve NCM tariff codes — all from\ninside an agent.\n\n## Install\n\n```sh\npnpm add @ar-agents/aduana\n```\n\n## Usage\n\n```ts\nimport { aduanaTools, HttpAduanaAdapter } from \"@ar-agents/aduana\";\n\nconst tools = aduanaTools({ adapter: new HttpAduanaAdapter() });\n// Pass `tools` directly to Vercel AI SDK's generateText / streamText.\n```\n\nFor testing, swap the HTTP adapter for the in-memory one:\n\n```ts\nimport { InMemoryAduanaAdapter } from \"@ar-agents/aduana\";\n\nconst tools = aduanaTools({\n  adapter: new InMemoryAduanaAdapter({\n    despachos: [\n      {\n        identifier: { kind: \"SUSI\", value: \"24001IM4001234A\" },\n        found: true,\n        status: \"canalizado_verde\",\n        operationKind: \"IM4\",\n        ncmCode: \"84713010\",\n      },\n    ],\n  }),\n});\n```\n\n## Tools\n\n| Tool | Returns |\n|---|---|\n| `aduana_lookup_despacho` | Status, operation kind, NCM, registration date, Aduana office. `{found: false}` for unknown IDs — not an error. |\n| `aduana_lookup_ncm` | Description, whether currently in force, AEC + DIE percent. |\n\n## Errors\n\nAll errors extend `AduanaError` (which extends `ArAgentsError` from\n`@ar-agents/core`):\n\n- `AduanaValidationError` — bad input\n- `AduanaUnconfiguredError` — adapter not wired (default), see error message\n  for setup steps\n- `AduanaApiError` — non-2xx HTTP response (retryable for 5xx / 429)\n\n## Status\n\nv0.1 — read-only against the public ARCA REST surface published in 2025.\nWrite operations (registering a despacho) require WSAA cert handling and\nare out of scope for v0.1.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}