← Public packages
@danj/audible-auth
Locked Audible credential gateway: Connect, token refresh, and narrow Audible calls for other Kody packages.
AGENTS.md
35 lines · 1.5 KB · Markdown@danj/audible-auth — agent notes
This package is the only code that handles Audible credentials. It is publish-locked: a push waits for the owner's Promote this commit click. What it offers callers, and its security posture, live in README.md.
Rules
- Handle secrets as
packageSecrets.getplaceholders only. Return, log, and throw nothing but metadata: no token, key, refresh response, Audible error body, or maplanding URL. src/policy.tsis the allowlist of Audible calls. Adding a call is a security change: name it in the commit subject so the owner sees it in review.- Keep
ARCHIVE_ENABLEDfalse until the owner asks for NAS archive. - Send the bearer token with no
client-idheader; Audible rejects this device's token when one is present. - After each promote, republish the packages that use this one: each bundles a
snapshot of it. Then run
communityPublishfor this package, so its public listing moves to the promoted commit. - In the README, link only to absolute URLs outside Kody user scopes. Kody's
renderer shows links to relative targets and to
/@…or/packages/…paths as plain text, so name packages and files in code instead. - Connect lives only in this package's app (
src/app.ts). Login URLs and maplanding URLs never cross an export.
Smoke test
./status returns ready: true, then one call:
audibleRequest({ path: '/1.0/library', query: { num_results: 1 } }).
Local checks
npm test and npm run typecheck (TypeScript 7, Node 26).