{"_id":"@agent-wasm/keychain","name":"@agent-wasm/keychain","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agent-wasm/keychain","version":"0.1.0","description":"Browser credential vault, OAuth orchestration, and session persistence for agent-wasm.","private":false,"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"},"./oauth":{"types":"./dist/oauth-services/index.d.ts","import":"./dist/oauth-services/index.js","require":"./dist/oauth-services/index.cjs","default":"./dist/oauth-services/index.js"},"./oauth/*":{"types":"./dist/oauth-services/*.d.ts","import":"./dist/oauth-services/*.js","require":"./dist/oauth-services/*.cjs","default":"./dist/oauth-services/*.js"}},"dependencies":{"@agent-wasm/core":"0.4.0"},"devDependencies":{"@types/node":"^25.0.10","typescript":"^5.9.3","vitest":"4.0.18","tsup":"^8.5.0"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"sideEffects":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts src/oauth-services/index.ts src/oauth-services/*.ts --tsconfig tsconfig.build.json --format esm,cjs --dts --clean --external @agent-wasm/core","test":"vitest run --passWithNoTests","type-check":"tsc --project tsconfig.json --noEmit"},"_id":"@agent-wasm/keychain@0.1.0","bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"homepage":"https://github.com/BLamy/agent-wasm#readme","_integrity":"sha512-RQFe45UQbfvqvwm9qAzXZg5Yd6irPXUpzzBkQHheUHQBQb9VaEo7BEY7Ch3LZ4hxE3CvOftPxh9x8Pqs9nNPnw==","_resolved":"/private/var/folders/xj/jvddkcmd6y9_f79xzk2z_rd00000gn/T/59c16e77bc33b4b0b30122282929472d/agent-wasm-keychain-0.1.0.tgz","_from":"file:agent-wasm-keychain-0.1.0.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-RQFe45UQbfvqvwm9qAzXZg5Yd6irPXUpzzBkQHheUHQBQb9VaEo7BEY7Ch3LZ4hxE3CvOftPxh9x8Pqs9nNPnw==","shasum":"f954de45701bae9ef335041b7d19b24c84a3cd57","tarball":"https://registry.npmjs.org/@agent-wasm/keychain/-/keychain-0.1.0.tgz","fileCount":60,"unpackedSize":409696,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHJi/1v+DD4rD5oQCGrieMNYzPrVUtSZah0GcWz38mOWAiEAuZ0fadJ4Yn1Ip/f1W/G6DR+yErk9oOT7qSE0CkfMTaU="}]},"_npmUser":{"name":"bel423","email":"bel423@gmail.com"},"directories":{},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/keychain_0.1.0_1784961621269_0.3020778324703768"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T06:40:21.093Z","0.1.0":"2026-07-25T06:40:21.411Z","modified":"2026-07-25T06:40:21.623Z"},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"description":"Browser credential vault, OAuth orchestration, and session persistence for agent-wasm.","homepage":"https://github.com/BLamy/agent-wasm#readme","repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"license":"MIT","readme":"# @agent-wasm/keychain\n\nThe headless credential / OAuth / vault engine behind agent-wasm. A\nWebAuthn-PRF-backed AES-GCM vault over a [`@agent-wasm/core`](https://www.npmjs.com/package/@agent-wasm/core)\n`VirtualFS`, an OAuth 2.0 orchestrator (discovery, PKCE, dynamic client\nregistration, token refresh), a credential mirror, and network/tailscale session\npersistence. No React and no DOM beyond Web Crypto / WebAuthn / `localStorage`.\n\n```bash\nnpm install @agent-wasm/keychain @agent-wasm/core\n```\n\n```ts\nimport { Keychain } from \"@agent-wasm/keychain\";\n\nconst keychain = new Keychain({\n  vfs,\n  // The engine carries no CLI heuristics — agent-launch detection is injected:\n  isAgentLaunchCommand: (cmd) => /\\b(claude|codex|opencode)\\b/.test(cmd),\n  onStateChange: (state) => render(state),\n});\n```\n\n## API\n\n- **`Keychain`** — the vault: WebAuthn unlock, AES-GCM encrypt/decrypt, credential\n  slot registration, auto-restore. Agent-launch detection is **injected** via\n  `isAgentLaunchCommand`, so the engine stays free of terminal-routing coupling.\n- **`encryptData` / `decryptData` / `deriveVaultKeyFromPrf` / `detectWebAuthnPrfSupport`** —\n  the crypto primitives.\n- **`CredentialMirror`** — mirror saved credentials into a workspace VFS / env.\n- Credential path constants (`CLAUDE_AUTH_*`, `CODEX_AUTH_PATH`,\n  `TAILSCALE_SESSION_KEYCHAIN_PATH`, …) and tailscale session helpers.\n\n## `@agent-wasm/keychain/oauth`\n\nThe OAuth 2.0 orchestrator subsystem: `OAuthServiceOrchestrator`,\n`OAuthServiceRegistry`, token store, PKCE, discovery, and dynamic client\nregistration — usable independently of the vault.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-9b939d0cb8c8cd7231b6e8bbbb3432fc"}