{"_id":"postfleet","name":"postfleet","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"postfleet","version":"0.1.0","description":"TypeScript SDK for Postfleet — email infrastructure for AI agents.","repository":{"type":"git","url":"git+https://github.com/Thestral12/postfleet-sdk.git"},"homepage":"https://postfleet.ai","license":"MIT","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"}}},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"keywords":["postfleet","email","agents","sdk","api"],"scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"devDependencies":{"@types/node":"^20","tsup":"^8.5.0","typescript":"^5"},"_id":"postfleet@0.1.0","bugs":{"url":"https://github.com/Thestral12/postfleet-sdk/issues"},"_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-udinl6HQmLAuBxv0Xfw2yQP7c+4DLMQK1f0HRd81+2OCBYs4EkIkkcoQMd+dT2WJBUqd8Z19Ncz1eEgkyAF1pQ==","shasum":"8d8b293422679ffc132dcf66f29939a207e7d5dd","tarball":"https://registry.npmjs.org/postfleet/-/postfleet-0.1.0.tgz","fileCount":7,"unpackedSize":26847,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD06hiEwbN5wrDKYsakdF3R3cMAWdykAEO4Y/vUTp2CzgIhAK6jUxdfLHDCvCFu0Of8rdX/zFMJFNchHdIVrcf8yHnz"}]},"_npmUser":{"name":"thestral12","email":"scottfoster@velorank.net"},"directories":{},"maintainers":[{"name":"thestral12","email":"scottfoster@velorank.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postfleet_0.1.0_1788830383376_0.25184778377645056"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-08T01:19:43.141Z","0.1.0":"2026-09-08T01:19:43.509Z","modified":"2026-09-08T01:19:43.703Z"},"maintainers":[{"name":"thestral12","email":"scottfoster@velorank.net"}],"description":"TypeScript SDK for Postfleet — email infrastructure for AI agents.","homepage":"https://postfleet.ai","keywords":["postfleet","email","agents","sdk","api"],"repository":{"type":"git","url":"git+https://github.com/Thestral12/postfleet-sdk.git"},"bugs":{"url":"https://github.com/Thestral12/postfleet-sdk/issues"},"license":"MIT","readme":"# postfleet\n\nTypeScript SDK for [Postfleet](https://postfleet.ai) — email infrastructure for AI agents.\n\n## Install\n\n```bash\nnpm install postfleet\n```\n\nNode 18+ (global `fetch`). A `pf_` API key from https://postfleet.ai.\n\n## Quickstart\n\n```ts\nimport { Postfleet } from 'postfleet';\n\nconst pf = new Postfleet({ apiKey: process.env.POSTFLEET_API_KEY! });\n\nconst box = await pf.mailboxes.create({ display_name: 'Support agent' });\n\nconst incoming = await pf.messages.waitFor({ mailbox_id: box.id });\nif (!incoming) throw new Error('timed out waiting for mail');\n\n// Read body_clean: the sanitized text. body_raw is the pre-sanitization original,\n// kept for audit — the exact surface the screening pipeline stripped.\nconsole.log(incoming.body_clean);\n\nawait pf.messages.send({\n  mailbox_id: box.id,\n  reply_to_message_id: incoming.id,\n  text: 'Got it — working on this now.',\n  client_id: 'reply-1',\n});\n```\n\n## Errors\n\nFailed requests throw `PostfleetError` (`status`, optional `code` / `retryable`, and the parsed `body`). A network failure is `status: 0` and `retryable: true`.\n\n```ts\nimport { Postfleet, PostfleetError } from 'postfleet';\n\ntry {\n  await pf.messages.send({ mailbox_id, to, subject, text, client_id });\n} catch (err) {\n  if (err instanceof PostfleetError && err.retryable) {\n    // retry with the SAME client_id\n  }\n  throw err;\n}\n```\n\n## Idempotency\n\n`client_id` is optional and the SDK never mints one. Generate a `client_id` once per logical send and reuse it on retry; never mint a new one per attempt. A fresh key on retry is exactly the double-send the key prevents.\n\n## Docs\n\n- SDK guide: https://postfleet.ai/docs/sdk\n- REST API: https://postfleet.ai/docs/api\n","readmeFilename":"README.md","_rev":"1-e5231807f751f2ef26bfe79f21acd0b5"}