{"_id":"@agent-sh/harness-read","_rev":"2-7486f6a672ef254b25400dabb7f77527","name":"@agent-sh/harness-read","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"@agent-sh/harness-read","version":"0.2.0","keywords":["ai","agent","llm","tool-use","read-file","bedrock","openai"],"author":{"name":"Avi Fenesh"},"license":"MIT","_id":"@agent-sh/harness-read@0.2.0","maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"homepage":"https://github.com/avifenesh/tools/tree/main/packages/read#readme","bugs":{"url":"https://github.com/avifenesh/tools/issues"},"dist":{"shasum":"e586cfd5fcb19a2b391581f94891f57a7c410c4c","tarball":"https://registry.npmjs.org/@agent-sh/harness-read/-/harness-read-0.2.0.tgz","fileCount":9,"integrity":"sha512-o0WHy4xvmmOgyBT/RIBgnSCHs6zjXLjklYsz8+Wfk9IBlUU7oKod2/RVW13An3m6L2qQwFw+/ZN6mWO9UVXf+A==","signatures":[{"sig":"MEUCIA9FBbQCjmOtSKi02jL992p5wUgWE+jbQA3DJfeOfGeeAiEA37OkNKDQ5K/5ZSTjnEzPlHp2DBNiEFRAN9jevJzhaDQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":131798},"main":"./dist/index.cjs","type":"module","_from":"file:agent-sh-harness-read-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"avifenesh","email":"aviarchi1994@gmail.com"},"_resolved":"/tmp/33cccb09c43e8252e928168247d0c130/agent-sh-harness-read-0.2.0.tgz","_integrity":"sha512-o0WHy4xvmmOgyBT/RIBgnSCHs6zjXLjklYsz8+Wfk9IBlUU7oKod2/RVW13An3m6L2qQwFw+/ZN6mWO9UVXf+A==","repository":{"url":"git+https://github.com/avifenesh/tools.git","type":"git","directory":"packages/read"},"_npmVersion":"10.8.2","description":"Read tool for AI agent harnesses — safe, bounded, line-numbered file reading with pluggable I/O, permissions, ledger, and cache","directories":{},"_nodeVersion":"20.20.2","dependencies":{"valibot":"^0.42.1","@agent-sh/harness-core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.4","typescript":"^5.6.3","@types/node":"^22.9.0"},"_npmOperationalInternal":{"tmp":"tmp/harness-read_0.2.0_1776853081305_0.7639908255519321","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@agent-sh/harness-read","version":"0.4.0","description":"Read tool for AI agent harnesses — safe, bounded, line-numbered file reading with pluggable I/O, permissions, ledger, and cache","keywords":["ai","agent","llm","tool-use","read-file","bedrock","openai"],"license":"MIT","author":{"name":"Avi Fenesh"},"homepage":"https://github.com/avifenesh/tools/tree/main/packages/read#readme","bugs":{"url":"https://github.com/avifenesh/tools/issues"},"repository":{"type":"git","url":"git+https://github.com/avifenesh/tools.git","directory":"packages/read"},"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"}},"publishConfig":{"access":"public"},"engines":{"node":">=20"},"dependencies":{"valibot":"^1.2.0","@agent-sh/harness-core":"0.2.0"},"devDependencies":{"@types/node":"^22.9.0","tsup":"^8.3.5","typescript":"^5.6.3","vitest":"^2.1.4"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist .turbo"},"_id":"@agent-sh/harness-read@0.4.0","_integrity":"sha512-Fno2Y9KwY2zZLTMArMAiTA2Bwc4Pw6c/FNFLjTYP1r8XaPYuQDEk02G7azesM5VhVBJnvtF95vbwWGO+vkBIqQ==","_resolved":"/tmp/eb36d22d622ca531279d2677c6db99b2/agent-sh-harness-read-0.4.0.tgz","_from":"file:agent-sh-harness-read-0.4.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Fno2Y9KwY2zZLTMArMAiTA2Bwc4Pw6c/FNFLjTYP1r8XaPYuQDEk02G7azesM5VhVBJnvtF95vbwWGO+vkBIqQ==","shasum":"0cb88258503c2300672c48350e53836479890039","tarball":"https://registry.npmjs.org/@agent-sh/harness-read/-/harness-read-0.4.0.tgz","fileCount":9,"unpackedSize":137008,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDI2AFxeZ7fAryNAdxDtmUmbHFWTY78otg9Sou75BrrmwIgeQ9fmaNxiTDRArDQIk4zovDEHCod3zC96/HvYYdzTpA="}]},"_npmUser":{"name":"avifenesh","email":"aviarchi1994@gmail.com"},"directories":{},"maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/harness-read_0.4.0_1780428525206_0.1591796836460999"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T10:18:01.217Z","modified":"2026-06-02T19:28:45.443Z","0.2.0":"2026-04-22T10:18:01.460Z","0.4.0":"2026-06-02T19:28:45.342Z"},"bugs":{"url":"https://github.com/avifenesh/tools/issues"},"author":{"name":"Avi Fenesh"},"license":"MIT","homepage":"https://github.com/avifenesh/tools/tree/main/packages/read#readme","keywords":["ai","agent","llm","tool-use","read-file","bedrock","openai"],"repository":{"type":"git","url":"git+https://github.com/avifenesh/tools.git","directory":"packages/read"},"description":"Read tool for AI agent harnesses — safe, bounded, line-numbered file reading with pluggable I/O, permissions, ledger, and cache","maintainers":[{"name":"avifenesh","email":"aviarchi1994@gmail.com"}],"readme":"# @agent-sh/harness-read\n\nSafe, bounded, line-numbered file reading with pagination, binary refusal, and fuzzy-sibling NOT_FOUND.\n\nPart of the [`@agent-sh/harness-*`](https://github.com/avifenesh/tools) monorepo — see the top-level README for architectural context and the full tool surface.\n\n## Install\n\n```sh\nnpm install @agent-sh/harness-read\n```\n\nRequires Node ≥ 20.\n\n## Usage\n\n```ts\nimport { read } from \"@agent-sh/harness-read\";\n\nconst r = await read(\n  { path: \"src/index.ts\", offset: 1, limit: 200 },\n  { cwd: process.cwd(), permissions: { roots: [process.cwd()], sensitivePatterns: [] } },\n);\n\nif (r.kind === \"text\") console.log(r.output);\n```\n\n## Contract\n\nThe full contract — input shape, output discriminated-union, error codes, permission model, and acceptance tests — lives in [`agent-knowledge/design/read.md`](https://github.com/avifenesh/tools/blob/main/agent-knowledge/design/read.md). Changes to this package must stay in sync with that spec.\n\n## License\n\nMIT © Avi Fenesh\n","readmeFilename":"README.md"}