{"_id":"@caiokf/valet","_rev":"4-244a9b13229bf200d5acb4d574e714fa","name":"@caiokf/valet","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@caiokf/valet","version":"0.1.0","keywords":["ai","cli","adapter","runtime","claude","codex","gemini","copilot","coderabbit","opencode","headless","automation"],"author":{"name":"caiokf"},"license":"MIT","_id":"@caiokf/valet@0.1.0","maintainers":[{"name":"caiokf","email":"caiokf@gmail.com"}],"homepage":"https://github.com/caiokf/valet#readme","bugs":{"url":"https://github.com/caiokf/valet/issues"},"dist":{"shasum":"6c7ad01952bcbd35dc73534186feb8f336d7cccb","tarball":"https://registry.npmjs.org/@caiokf/valet/-/valet-0.1.0.tgz","fileCount":6,"integrity":"sha512-6W1uZtUwHdoQ2uoWGrNRql9dYS9mAuVU+2+QqSzZqedFF6FjZqNOgDZpWQy7qQPFpewyqHrVoG5e7SguCnb5rw==","signatures":[{"sig":"MEYCIQDjEcraMnC9IWpjGhBjc5x2tiKSM/gip6uk6Bs4VLwZUwIhAJMGhS65d8x5DVdPzdO3+mUtDroX2oT9syaGWT0LQTsq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99056},"main":"./dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"25e5781c6f916388145bad66e32702508ffbc245","scripts":{"lint":"biome lint .","test":"vitest run","build":"tsup","format":"biome format --write .","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"biome format .","test:coverage":"vitest run --coverage","prepublishOnly":"tsup"},"_npmUser":{"name":"caiokf","email":"caiokf@gmail.com"},"repository":{"url":"git+https://github.com/caiokf/valet.git","type":"git"},"_npmVersion":"11.6.2","description":"Unified adapter layer for headlessly driving AI coding CLI tools","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.1.1","typescript":"^5.8.3","@types/node":"^25.0.0","@biomejs/biome":"^2.4.12"},"_npmOperationalInternal":{"tmp":"tmp/valet_0.1.0_1776387590165_0.48292871921603875","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@caiokf/valet","version":"0.1.1","keywords":["ai","cli","adapter","runtime","claude","codex","gemini","copilot","coderabbit","opencode","headless","automation"],"author":{"name":"caiokf"},"license":"MIT","_id":"@caiokf/valet@0.1.1","maintainers":[{"name":"caiokf","email":"caiokf@gmail.com"}],"homepage":"https://github.com/caiokf/valet#readme","bugs":{"url":"https://github.com/caiokf/valet/issues"},"dist":{"shasum":"43c13d9322cd119d060e880b870cce81295bfb1e","tarball":"https://registry.npmjs.org/@caiokf/valet/-/valet-0.1.1.tgz","fileCount":6,"integrity":"sha512-DoXFIpk5Nhy8UmrLJrSEJfBkPGgT+k4uQXQfoCIkX7/Chc/CtHJkHhp97SlVA+eLP1g8oKR7a6LsCNlM1W7MHg==","signatures":[{"sig":"MEYCIQDFS5ElAy+oK3F2nwrZr07eD/apPaZPkHkRUTOi0D9KegIhANPka5cJBblXKtS9nwvWDR6h8mLxHf+nPJMAX5cknNlH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99364},"main":"./dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"43d6865d956c279818bd576df3fc40c5db929eb5","scripts":{"lint":"biome lint .","test":"vitest run","build":"tsup","format":"biome format --write .","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"biome format .","test:coverage":"vitest run --coverage","prepublishOnly":"tsup"},"_npmUser":{"name":"caiokf","email":"caiokf@gmail.com"},"repository":{"url":"git+https://github.com/caiokf/valet.git","type":"git"},"_npmVersion":"11.6.2","description":"Unified adapter layer for headlessly driving AI coding CLI tools","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.1.1","typescript":"^5.8.3","@types/node":"^25.0.0","@biomejs/biome":"^2.4.12"},"_npmOperationalInternal":{"tmp":"tmp/valet_0.1.1_1776389685799_0.5880290769285885","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@caiokf/valet","version":"0.2.0","keywords":["ai","cli","adapter","runtime","claude","codex","gemini","copilot","coderabbit","opencode","headless","automation"],"author":{"name":"caiokf"},"license":"MIT","_id":"@caiokf/valet@0.2.0","maintainers":[{"name":"caiokf","email":"caiokf@gmail.com"}],"homepage":"https://github.com/caiokf/valet#readme","bugs":{"url":"https://github.com/caiokf/valet/issues"},"dist":{"shasum":"fa31109c54270c7ffc34b6ce7ae795c4611647ad","tarball":"https://registry.npmjs.org/@caiokf/valet/-/valet-0.2.0.tgz","fileCount":6,"integrity":"sha512-pbqjJ5AQ2vfLTqRZ0XU+x7CS+JaaBga3ZL0q4sFgHtYA44UyTNr8d5wtOa8hkdPuh0qXASA9YvTtQEIFarSehw==","signatures":[{"sig":"MEUCIBjBNyP4dqFaSUYQ3dp0PWOSQYY7KPM1R4Yuaa5KRc9eAiEA3xTKJO2Ksvq7GSLrII0ZlOSLYuxUaKpVML8Y799KUok=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101493},"main":"./dist/index.js","type":"module","_from":"file:caiokf-valet-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"biome lint .","test":"vitest run","build":"tsup","format":"biome format --write .","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"biome format .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"caiokf","email":"caiokf@gmail.com"},"_resolved":"/private/var/folders/2d/90q0bb9d2r7873skqn_hqf5w0000gn/T/8170d00c8ae2e586a99f0435e3c395cb/caiokf-valet-0.2.0.tgz","_integrity":"sha512-pbqjJ5AQ2vfLTqRZ0XU+x7CS+JaaBga3ZL0q4sFgHtYA44UyTNr8d5wtOa8hkdPuh0qXASA9YvTtQEIFarSehw==","repository":{"url":"git+https://github.com/caiokf/valet.git","type":"git"},"_npmVersion":"11.17.0","description":"Unified adapter layer for headlessly driving AI coding CLI tools","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.1.1","typescript":"^5.8.3","@types/node":"^25.0.0","@biomejs/biome":"^2.4.12"},"_npmOperationalInternal":{"tmp":"tmp/valet_0.2.0_1785460877875_0.0008690899385785933","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@caiokf/valet","version":"0.4.0","description":"Unified adapter layer for headlessly driving AI coding CLI tools","type":"module","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"main":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"scripts":{"prepublishOnly":"tsup","build":"tsup","typecheck":"tsc --noEmit","lint":"biome lint .","format":"biome format --write .","format:check":"biome format .","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage"},"keywords":["ai","cli","adapter","runtime","claude","codex","gemini","copilot","coderabbit","opencode","headless","automation"],"author":{"name":"caiokf"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/caiokf/valet.git"},"bugs":{"url":"https://github.com/caiokf/valet/issues"},"homepage":"https://github.com/caiokf/valet#readme","devDependencies":{"@biomejs/biome":"^2.4.12","@types/node":"^25.0.0","tsup":"^8.4.0","typescript":"^5.8.3","vitest":"^3.1.1"},"engines":{"node":">=20"},"pnpm":{"onlyBuiltDependencies":["esbuild"]},"_id":"@caiokf/valet@0.4.0","gitHead":"28a9cf15312db59cdcb309a85543688cf57d6427","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-b0Bsmrz5F/U//TkRQPWqEPq+sUESv/irb5SLX7mZrHjteSWA59dG3EdailyesfSHNKm6M9ir6mkxUS+erXTZwA==","shasum":"2b7857107db81c3e5b13580ce6d5f3df9d800e43","tarball":"https://registry.npmjs.org/@caiokf/valet/-/valet-0.4.0.tgz","fileCount":6,"unpackedSize":138066,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDG6fiogY3qTe+7XVvNZP/czmNoqbIfr9yD5eaitTKVoAIgBHzHIjnWJedYQ4qzPH4iaQA2ODN5AmNbdEsjydKekS8="}]},"_npmUser":{"name":"caiokf","email":"caiokf@gmail.com"},"directories":{},"maintainers":[{"name":"caiokf","email":"caiokf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/valet_0.4.0_1787190395820_0.3521015604675326"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-17T00:59:50.101Z","modified":"2026-08-20T01:46:36.662Z","0.1.0":"2026-04-17T00:59:50.297Z","0.1.1":"2026-04-17T01:34:45.931Z","0.2.0":"2026-07-31T01:21:18.026Z","0.4.0":"2026-08-20T01:46:35.960Z"},"bugs":{"url":"https://github.com/caiokf/valet/issues"},"author":{"name":"caiokf"},"license":"MIT","homepage":"https://github.com/caiokf/valet#readme","keywords":["ai","cli","adapter","runtime","claude","codex","gemini","copilot","coderabbit","opencode","headless","automation"],"repository":{"type":"git","url":"git+https://github.com/caiokf/valet.git"},"description":"Unified adapter layer for headlessly driving AI coding CLI tools","maintainers":[{"name":"caiokf","email":"caiokf@gmail.com"}],"readme":"# valet\n\n[![CI](https://github.com/caiokf/valet/actions/workflows/ci.yml/badge.svg)](https://github.com/caiokf/valet/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/valet)](https://www.npmjs.com/package/valet)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n```\n             _      _\n __   ____  | | ___| |_\n \\ \\ / / _` | |/ _ \\ __|\n  \\ V / (_| | |  __/ |_\n   \\_/ \\__,_|_|\\___|\\__|\n```\n\n> Unified adapter layer for headlessly driving AI coding CLI tools.\n\nOne API to execute prompts, check health, and validate models across **10 AI coding runtimes**.\n\n## Supported Runtimes\n\n| Runtime | CLI Command | Strategy | PTY |\n|---------|-------------|----------|-----|\n| Claude | `claude` | file-ref | no |\n| Codex | `codex` | stdin | no |\n| Gemini | `gemini` | stdin | no |\n| Kimi | `kimi` | stdin | no |\n| CodeRabbit | `cr` | native-review | no |\n| OpenCode | `opencode` | expect-script | yes |\n| Pi | `pi` | stdin | no |\n| Droid | `droid` | expect-script | yes |\n| MastraCode | `mastracode` | expect-script | yes |\n| Copilot | `gh` | file-ref | no |\n\n## Install\n\n```bash\nnpm install valet\n```\n\n## Usage\n\n```typescript\nimport { getRuntime, getAllRuntimes, getRuntimeNames } from \"valet\"\n\n// List all available runtimes\nconst names = getRuntimeNames()\n// [\"claude\", \"codex\", \"gemini\", \"kimi\", \"coderabbit\", \"opencode\", \"pi\", \"droid\", \"mastracode\", \"copilot\"]\n\n// Get a specific runtime adapter\nconst claude = getRuntime(\"claude\")\n\n// Check if a runtime is installed and authenticated\nconst health = await claude.healthCheck()\n// { installed: true, authenticated: true, version: \"1.0.0\" }\n\n// Validate a model\nclaude.validateModel(\"sonnet\") // true\n\n// Execute a prompt\nconst result = await claude.execute({\n  taskName: \"review-bugs\",\n  prompt: \"Review this code for bugs\",\n  model: \"sonnet\",\n  promptFile: \"/path/to/prompt.txt\",\n})\n// { raw: \"...\", exitCode: 0, durationMs: 1234 }\n```\n\n## Architecture\n\nValet provides a unified `RuntimeAdapter` interface that each CLI tool implements:\n\n- **`execute(request)`** - Run a prompt headlessly and return raw output\n- **`healthCheck()`** - Verify installation and authentication status\n- **`validateModel(model)`** - Check if a model is supported\n- **`preflight(request)`** - Pre-flight validation before execution\n\nPrompt delivery strategies:\n- **stdin** - Pipe the prompt via stdin\n- **file-ref** - Reference a file for the CLI to read\n- **file-arg** - Pass the prompt file path as a CLI argument\n- **expect-script** - Drive TUI-only tools via `expect`\n- **native-review** - Runtime has its own review engine\n\n## Zero Dependencies\n\nValet has **zero runtime dependencies**. It only uses Node.js built-ins (`child_process`, `fs`, `path`, `os`).\n\n## Development\n\n```bash\npnpm install\npnpm build\npnpm test\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}