{"_id":"@aiquants/storage-api","_rev":"10-4dc7749f380f4de668b0892546a80d23","name":"@aiquants/storage-api","dist-tags":{"latest":"0.7.0"},"versions":{"0.2.0":{"name":"@aiquants/storage-api","version":"0.2.0","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.2.0","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"dist":{"shasum":"4161d34dd101f540dd7116688ad47c2a3509e092","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.2.0.tgz","fileCount":21,"integrity":"sha512-aJ+CTRMzNfTf1vXPFzIflB9py0gBq2/zO7MrZbFZ2JsF94DUEtLuiClCHY0nFf7Dueq/oD8rlxBN5f/NQAskWg==","signatures":[{"sig":"MEQCIDiC0B3qRt56Ijc+fmyNFpO9vF0ITqW8+njMkWqAerH0AiBmiYQlY12ixvZfwq8ObWLXTEA9Z1Wg38yp2MrsJSPG+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27730729},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0","pnpm":">=8.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup && pnpm run build:go","check":"biome check src/","clean":"rimraf dist","build:go":"GOOS=linux GOARCH=amd64 go build -C ../go/storage-api -o ../../storage-api/dist/storage-api ./cmd/storage-api && (chmod +x dist/storage-api || true)","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","postinstall":"chmod +x dist/storage-api || true","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.2.0_1785374600284_0.04740242557443386","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aiquants/storage-api","version":"0.3.0","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.3.0","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"caac0ccc0f927bd408f0acb6b327295eaf55750f","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.3.0.tgz","fileCount":20,"integrity":"sha512-3AV7Ajzp2ama+5rkqEe9y/lQbyInWXqZLiA5puh9xTcz5KCfXOoAbiEJij2bi2mT1uQ687iB7TJqCR6dLtgckg==","signatures":[{"sig":"MEUCIQDZD+AbYZXqX/4MpzaEIGccG9X+QqbUG+8qq9PUTYXwWQIgAs8TJrEu/DG5bl/Q9Ldxboo1w6snzUiotQ4+dEdtRt8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":566167},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.3.0","@aiquants/storage-api-win32-x64":"0.3.0","@aiquants/storage-api-darwin-x64":"0.3.0","@aiquants/storage-api-linux-arm64":"0.3.0","@aiquants/storage-api-win32-arm64":"0.3.0","@aiquants/storage-api-darwin-arm64":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.3.0_1785392953319_0.7692921810994438","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aiquants/storage-api","version":"0.3.1","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.3.1","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"761aed86b0e6ba3837b3eeacdb82c2533b522917","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.3.1.tgz","fileCount":20,"integrity":"sha512-y2jmGeNkwN6XMdlWA68TcVLowY0PibIO30LRyrJQ7XBC16utWnkNC5nYyAjErrOz7ppmpVDulqsGsviTWIWPNg==","signatures":[{"sig":"MEUCIDXSFoecIF27hE488KDIJnsaUCj0342yLZoixfDnru99AiEAvc5EEyb4T8TnaBRyHhC62gvOHL0W4GpXyTLaSoVZip0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":566167},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.3.1","@aiquants/storage-api-win32-x64":"0.3.1","@aiquants/storage-api-darwin-x64":"0.3.1","@aiquants/storage-api-linux-arm64":"0.3.1","@aiquants/storage-api-win32-arm64":"0.3.1","@aiquants/storage-api-darwin-arm64":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.3.1_1785483243324_0.20917815463925682","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aiquants/storage-api","version":"0.4.0","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.4.0","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"4b69b93fdb3006f003afae6de8e92ef1ff2e8279","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.4.0.tgz","fileCount":20,"integrity":"sha512-mhLQVUllGK94ToeKu+5C6yC2HFwGBCVcX1YiiHvqhXAGDI0oRdYKNFuLVtWh8eI9b2MHXOGSAuIpdBtZIvrSPA==","signatures":[{"sig":"MEUCICFXACekeqk4EfYlG605CENYDG8CYJh7Z14SWo7ErBUaAiEAsIk7Bkd85tJhXe/1Cq1h91dOBNJJS7qjJf540FEV30Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":567554},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.4.0","@aiquants/storage-api-win32-x64":"0.4.0","@aiquants/storage-api-darwin-x64":"0.4.0","@aiquants/storage-api-linux-arm64":"0.4.0","@aiquants/storage-api-win32-arm64":"0.4.0","@aiquants/storage-api-darwin-arm64":"0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.4.0_1785711822475_0.12490972862296879","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@aiquants/storage-api","version":"0.5.0","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.5.0","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"db6cc7366326387041f14612acd3e01716a00d60","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.5.0.tgz","fileCount":20,"integrity":"sha512-VmOmUd6MN05rdqac2hq0/kp+MsmE+mJQvM3aWRekrlcltVU4Nnmg5P1y+54l4B+qY8jdgF0ZTM+u/V4wGsSSdA==","signatures":[{"sig":"MEUCIHrmXxAwZGz25aRWM6XOcPNKcMjx6iuSiPEDGf3/Bh8iAiEA/sapAljb648vjDD2aCD4ReMyuTDAKzj7hU15YoROcWE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":570049},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.5.0","@aiquants/storage-api-win32-x64":"0.5.0","@aiquants/storage-api-darwin-x64":"0.5.0","@aiquants/storage-api-linux-arm64":"0.5.0","@aiquants/storage-api-win32-arm64":"0.5.0","@aiquants/storage-api-darwin-arm64":"0.5.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.5.0_1785931973764_0.7388066513811686","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@aiquants/storage-api","version":"0.6.0","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.6.0","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"197fd53d437a2fbfa903f01e52f5d36557665efd","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.6.0.tgz","fileCount":20,"integrity":"sha512-eB6OYnKhhmahYjHFpqv9C/7nQqvozDVi5S2hmkFkBBeuyiH5uUXvrGGKibioyYfMcXv5V7rtJdnjzd86nunTYw==","signatures":[{"sig":"MEQCIGOVwA6asyYzZnNwzB3vm7yFL5sqpI0+THA6jnqjV4ZyAiAyi5Aa6QeDYMR1kOoYlHdC86Noj1HiGmS+gFPnqWorhg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":571279},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.6.0","@aiquants/storage-api-win32-x64":"0.6.0","@aiquants/storage-api-darwin-x64":"0.6.0","@aiquants/storage-api-linux-arm64":"0.6.0","@aiquants/storage-api-win32-arm64":"0.6.0","@aiquants/storage-api-darwin-arm64":"0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.6.0_1786074180203_0.02481027702912475","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@aiquants/storage-api","version":"0.6.1","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.6.1","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"ef52e5521c99bd809c4e2f013f310d9f3c1ae3fc","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.6.1.tgz","fileCount":20,"integrity":"sha512-uh/YBV+mPk5wIFIOCHz4LbPQNEmhs9P8/xEZfHnl8wDZ9WLC7Bifrp6uKZAtRxQvOLxDmU8i5LD8GLi4dmQtDg==","signatures":[{"sig":"MEUCIFLgk0NmeMSZAZ8Wd9u6Ri1BUou1HiEt8t86s36fFXjvAiEAo7shV30Ff8ks0BSxvlBEv+KWY19xatw/kMni+WFw2KM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":571279},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.6.1","@aiquants/storage-api-win32-x64":"0.6.1","@aiquants/storage-api-darwin-x64":"0.6.1","@aiquants/storage-api-linux-arm64":"0.6.1","@aiquants/storage-api-win32-arm64":"0.6.1","@aiquants/storage-api-darwin-arm64":"0.6.1"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.6.1_1786149622539_0.43018080965130423","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@aiquants/storage-api","version":"0.6.2","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.6.2","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"54c213131fb9bfc902721550a4a5380bca1985bc","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.6.2.tgz","fileCount":20,"integrity":"sha512-Own7k14Mxw0QxjFXxplByOWYRUVXwT7Xry3TEalouEy5ZdhePqQP/n2pjWIgFcnKG0sffkZhiiyRLhFmyXVYZg==","signatures":[{"sig":"MEQCIDS/ynbVs9V+iZJI6ygFkA5IfUEOlsa/7nh/QGuMPh5gAiAEPhRSajMeDGGmgknHIkYPVqjWFNeH2magV9TZDTIDfQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":571279},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.6.2","@aiquants/storage-api-win32-x64":"0.6.2","@aiquants/storage-api-darwin-x64":"0.6.2","@aiquants/storage-api-linux-arm64":"0.6.2","@aiquants/storage-api-win32-arm64":"0.6.2","@aiquants/storage-api-darwin-arm64":"0.6.2"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.6.2_1786538856988_0.29225224378472103","host":"s3://npm-registry-packages-npm-production"}},"0.6.3":{"name":"@aiquants/storage-api","version":"0.6.3","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"author":"AI Quants","license":"MIT","_id":"@aiquants/storage-api@0.6.3","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"dist":{"shasum":"96a97eba0161a88f3de86e1ed6ce552b7f368c61","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.6.3.tgz","fileCount":20,"integrity":"sha512-A+ztZO8UcAl3rehMzZTdf93v4T+FaQtSq6WlqhTiaH1z1NMaZEWPrfK/IpiNiSUogtO1mjyIjIs6UaQzbOy/SA==","signatures":[{"sig":"MEYCIQDYuOTfILVtCuoY58fKzuvpQAmnvLOhGzmPtvviWIkqjgIhALskWm209LPwEwh9xdcePv/8eHOkYA43Fyv7DsdZoTYL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":571284},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","lint":"biome lint src/","test":"vitest run","build":"tsup","check":"biome check src/","clean":"rimraf dist","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","check:fix":"biome check --write src/","typecheck":"tsc --noEmit","test:watch":"vitest","build:watch":"tsup --watch","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","test:coverage":"vitest run --coverage","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"repository":{"url":"git+https://github.com/fehde-k/aiquants.git","type":"git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","rimraf":"^6.1.2","vitest":"^4.1.8","typescript":"^5.9.3","@types/node":"^25.9.1","@bufbuild/protoc-gen-es":"^1.10.1","@aiquants/platform-packaging":"0.1.0","@connectrpc/protoc-gen-connect-es":"^1.7.0"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.6.3","@aiquants/storage-api-win32-x64":"0.6.3","@aiquants/storage-api-darwin-x64":"0.6.3","@aiquants/storage-api-linux-arm64":"0.6.3","@aiquants/storage-api-win32-arm64":"0.6.3","@aiquants/storage-api-darwin-arm64":"0.6.3"},"_npmOperationalInternal":{"tmp":"tmp/storage-api_0.6.3_1786894644159_0.08688142356997819","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@aiquants/storage-api","version":"0.7.0","description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"license":"MIT","author":"AI Quants","repository":{"type":"git","url":"git+https://github.com/fehde-k/aiquants.git","directory":"packages/storage-api"},"homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"sideEffects":false,"engines":{"node":">=20.3.0"},"dependencies":{"@bufbuild/protobuf":"^1.10.1","@connectrpc/connect":"^1.7.0","@connectrpc/connect-node":"^1.7.0"},"devDependencies":{"@bufbuild/protoc-gen-es":"^1.10.1","@connectrpc/protoc-gen-connect-es":"^1.7.0","@types/node":"^25.9.1","rimraf":"^6.1.2","tsup":"^8.5.1","typescript":"^5.9.3","vitest":"^4.1.8","@aiquants/platform-packaging":"0.1.0"},"publishConfig":{"access":"public"},"optionalDependencies":{"@aiquants/storage-api-linux-x64":"0.7.0","@aiquants/storage-api-linux-arm64":"0.7.0","@aiquants/storage-api-darwin-x64":"0.7.0","@aiquants/storage-api-darwin-arm64":"0.7.0","@aiquants/storage-api-win32-x64":"0.7.0","@aiquants/storage-api-win32-arm64":"0.7.0"},"scripts":{"build":"tsup","build:watch":"tsup --watch","dev":"tsup --watch","generate":"pnpm dlx @bufbuild/buf generate ../go/storage-api/proto && pnpm exec biome check --write src/gen","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"biome lint src/","check":"biome check src/","check:fix":"biome check --write src/","clean":"rimraf dist","publish:patch":"pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:minor":"pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","publish:major":"pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm run build:platforms && pnpm run publish:platforms && pnpm publish --no-git-checks","build:platforms":"node scripts/build-platform-packages.mjs","publish:platforms":"node scripts/publish-platform-packages.mjs"},"_nodeVersion":"26.0.0","_id":"@aiquants/storage-api@0.7.0","dist":{"integrity":"sha512-cxxC/rKEsfw9HoIQ1oMghmF3TI8in5rXWvKyrGdZEtZZHf8mvmy6y0DJKkdBPb7lDcuQCKL84eUW6SguKg4Zog==","shasum":"ead553a9102c832942b1ede190ea30601290f903","tarball":"https://registry.npmjs.org/@aiquants/storage-api/-/storage-api-0.7.0.tgz","fileCount":21,"unpackedSize":615583,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDsbs5ARTOOdHsFqkS1YcV91Y4/WeYkREh4C7LlfFr5AAIgCxKH+WvUNv+0utnp68D2RrjNjcpybqY+NPrHahowiyo="}]},"_npmUser":{"name":"fehde","email":"genbu0498@gmail.com"},"directories":{},"maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storage-api_0.7.0_1786909140399_0.7888841028630629"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-30T01:23:20.121Z","modified":"2026-08-16T19:39:00.755Z","0.2.0":"2026-07-30T01:23:20.585Z","0.3.0":"2026-07-30T06:29:13.459Z","0.3.1":"2026-07-31T07:34:03.480Z","0.4.0":"2026-08-02T23:03:42.635Z","0.5.0":"2026-08-05T12:12:53.936Z","0.6.0":"2026-08-07T03:43:00.362Z","0.6.1":"2026-08-08T00:40:22.687Z","0.6.2":"2026-08-12T12:47:37.130Z","0.6.3":"2026-08-16T15:37:24.284Z","0.7.0":"2026-08-16T19:39:00.589Z"},"bugs":{"url":"https://github.com/fehde-k/aiquants/issues"},"author":"AI Quants","license":"MIT","homepage":"https://github.com/fehde-k/aiquants/tree/main/packages/storage-api#readme","keywords":["storage","connectrpc","grpc","google-cloud-storage","google-drive","filesystem","typescript"],"repository":{"type":"git","url":"git+https://github.com/fehde-k/aiquants.git","directory":"packages/storage-api"},"description":"Server-side TypeScript client for the multi-backend storage-api ConnectRPC service (local filesystem, Google Cloud Storage, Google Drive, in-memory) over a UNIX domain socket.","maintainers":[{"name":"fehde-k","email":"owner@aiquants.co.jp"},{"name":"fehde","email":"genbu0498@gmail.com"}],"readme":"# @aiquants/storage-api\n\nServer-side TypeScript client for the multi-backend `storage-api` ConnectRPC service.\n\nローカルファイルシステム / Google Cloud Storage / Google Drive / インメモリを **単一の API** で扱えます。バックエンドは URI スキームで切り替わるだけで、呼び出し側のコードは変わりません。\n\n実処理は Go 実装のサービス (`storage.v1.StorageService`) が担い、本パッケージは UNIX ドメインソケット経由の ConnectRPC クライアントとして振る舞います。サービスバイナリは自動で起動されるため、**利用側で Go ツールチェーンやサービス管理は不要**です。\n\n> **Node 専用**: `node:child_process` / `node:net` を使用します。ブラウザ向けバンドルへ含めないでください。\n\n## Install\n\n```bash\nnpm install @aiquants/storage-api    # pnpm add / yarn add でも同じ\n```\n\nサービスバイナリは**プラットフォーム別のパッケージ**として配布され、npm が実行環境に合うものだけを自動選択します (esbuild や Biome と同じ方式)。本体パッケージ自体は約 100 KB で、バイナリを含みません。\n\n| プラットフォーム | 対応 |\n| --- | --- |\n| Linux x64 / arm64 | ✅ |\n| macOS x64 (Intel) / arm64 (Apple Silicon) | ✅ |\n| Windows x64 / arm64 | ✅ |\n\n`postinstall` スクリプトは不要です (実行権限は npm の `bin` 契約で保証されます)。ライフサイクルスクリプトを禁止している環境でもそのまま動きます。\n\n<details>\n<summary>上記以外のプラットフォームで使う</summary>\n\nサービスを自分でビルドし、その場所を教えてください。\n\n```bash\ngit clone https://github.com/fehde-k/aiquants.git\ncd aiquants/packages/go/storage-api\ngo build -o dist/storage-api ./cmd/storage-api\n```\n\n```ts\nconst storage = createStorageClient({ binaryPath: \"/path/to/storage-api\" })\n// または環境変数 STORAGE_API_BINARY で指定\n```\n\n</details>\n\n## Quick start\n\n```ts\nimport { createStorageClient, toFileUri } from \"@aiquants/storage-api\"\n\n// workspaceRoot の外へのアクセスは file:// バックエンドが拒否する (パス走査対策)\nconst storage = createStorageClient({ workspaceRoot: process.cwd() })\n\nconst markdown = await storage.readText(toFileUri(`${process.cwd()}/README.md`))\nconst tree = await storage.walkDirectory(toFileUri(process.cwd()), { excludeGlobs: [\"node_modules\", \".git\"] })\n```\n\nサービスが未起動の場合は同梱バイナリを自動起動します。既に待ち受け中のサーバ (開発時の `concurrently`、本番の supervisord) があればそれを再利用するため、呼び出し側はライフサイクルを意識する必要はありません。\n\n## URI scheme\n\n| Scheme | Backend | Example |\n| --- | --- | --- |\n| `file` (既定) | ローカルファイルシステム | `file:///srv/app/docs/guide.md` |\n| `gcs` | Google Cloud Storage | `gcs://bucket/path/object.md` |\n| `gdrive` | Google Drive | `gdrive://id:1AbC...` |\n| `memory` | インメモリ (テスト用) | `memory://docs/a.txt` |\n\nパスはパーセントエンコードしません。サーバ側はスキームを除いた残りをそのままパス / オブジェクト名として扱います。\n\n## API\n\n| Method | 説明 |\n| --- | --- |\n| `readFile(uri)` / `readText(uri)` | 生バイト列 / UTF-8 テキストとして読み込む (バッファ読み。既定 64 MiB 上限、`maxReadBufferBytes` オプションで変更可) |\n| `readStream(uri)` | 内容を Web `ReadableStream` として開く (サイズ上限なし。`Response` の body へ直結可能) |\n| `writeFile(uri, content, { mimeType, keepRevision })` | 作成または上書き |\n| `updateFile(uri, content, { mimeType, keepRevision })` | バックエンド上の同一性 (Drive のファイル ID 等) を保ったまま更新 |\n| `deleteFile(uri)` | 削除 |\n| `exists(uri)` | 存在確認 |\n| `getResource(uri)` | メタ情報 (`size` / `mtime` / `mimeType` 等) を取得 |\n| `listDirectory(uri)` | 直下の項目を列挙 |\n| `walkDirectory(uri, { excludeGlobs })` | **1 往復で** 再帰的に全子孫を取得 |\n| `generateSignedUrl(uri, options)` | 署名付き (ローカルはプロキシ) URL を発行 |\n| `uploadResumable(uri, source, options)` | **分割・レジューム可能なアップロード** (下記参照) |\n| `initiateUpload` / `uploadChunk` / `uploadStatus` / `completeUpload` / `abortUpload` | レジュームアップロードの低レベル操作 |\n| `listRevisions(uri)` | **バージョン履歴**を古い順に列挙 (現行世代の判定は `isHead` で行う) |\n| `readRevision(uri, revisionId)` | 過去世代の内容を読み込む |\n| `retainRevision(uri, revisionId, keep)` | リビジョンを自動削除から保護する / 解除する (Drive の過去世代は解除不可) |\n| `close()` | 自動起動したサービスを停止する (既存サーバへの接続時は何もしない)。主にテストの後片付け用 |\n\n`walkDirectory` の `excludeGlobs` に一致したディレクトリは、プロバイダが枝刈りに対応していればサブツリーごと走査を打ち切ります (`node_modules` のような巨大ディレクトリの走査回避)。パターンはサーバ側でそのまま適用され、**否定パターン (`!`) は評価されません**。\n\n> **注意**: gitignore の完全な意味論 (否定による再包含) を実装する場合、否定パターンを含むパターン集合を `excludeGlobs` へ渡さないでください。サーバが先に枝刈りしてしまうと、後から復活させるべき項目が結果に現れません。否定を含むときは `excludeGlobs` を空にして全件取得し、判定を呼び出し側の gitignore 実装へ一本化します。\n\n`buildStorageTree(walkResult)` でフラットな結果を入れ子ツリーへ組み立てられます。ディレクトリエントリを返さないバックエンド (フラットなオブジェクトストア) では中間ディレクトリを子の URI から補完します。\n\n### バージョン履歴\n\n`listRevisions` / `readRevision` / `retainRevision` は**版管理を持つバックエンドでのみ**利用できます。対応していないバックエンド (`file://`) では `unimplemented` で失敗するので、`isStorageError(error, \"unimplemented\")` で機能の有無として分岐できます。\n\n| バックエンド | 一覧 / 読み出し | 保護 (`retainRevision`) |\n| --- | --- | --- |\n| `gdrive://` | 対応 | 対応 (過去世代の解除だけ不可) |\n| `gcs://` | 対応 (世代 = generation) | **非対応** (`unimplemented`) |\n| `memory://` | 対応 | 対応 |\n| `file://` | **非対応** (`unimplemented`) | — |\n\n`memory://` は既定では登録されていません。実サービス越しに版管理を検証したい場合のみ `createStorageClient({ enableMemoryProvider: true })` で有効化してください (プロセス内の無制限マップなので**本番では有効化しないこと**)。\n\n```ts\nconst revisions = await client.listRevisions(\"gdrive://reports/daily.json\")\n// 古い順。現行世代は isHead で判定する (通常は末尾。GCS の全世代削除済み\n// オブジェクト等では現行世代が 1 件も返らないことがある)\nconst previous = revisions.at(-2)\nif (previous) {\n    const bytes = await client.readRevision(\"gdrive://reports/daily.json\", previous.id)\n}\n```\n\n> **Google Drive の保護 (`keepForever`) は、外せる場合と外せない場合があります。** 2026-07-29 に実機で切り分けた結果は次のとおりです。\n>\n> | 対象 | `retainRevision(uri, id, false)` |\n> | --- | --- |\n> | 未保護のリビジョン | 成功 (何も起きない) |\n> | 保護済みの**現行世代** (`isHead`) | **成功** (解除できる) |\n> | 保護済みの**過去世代** | **`failed_precondition` で失敗** |\n>\n> 過去世代の保護を外す唯一の手段は、そのリビジョンを完全に削除することです (内容ごと失われるため「解除」とは呼べません)。**UI に解除操作を置く場合は、`isHead` が `false` かつ `keepForever` が `true` の項目では無効化してください。**\n>\n> Drive は保護していないバイナリリビジョンを概ね 30 日で自動削除します。監査や巻き戻しのために履歴を残したい場合は、書き込み時に `writeFile(uri, content, { keepRevision: true })` を指定してください。\n>\n> なお Google は「保護されていないバイナリリビジョンはダウンロードできない」とも文書化していますが、上記の実機検証では未保護の過去世代を問題なく読み出せました。条件付きの制限か記述が古いかは不明なので、**どちらにも依存しない**実装にしてください (読めない場合に備えて `failed_precondition` を扱いつつ、読めることを前提にもしない)。\n>\n> Drive は編集頻度の高いファイルについて古いリビジョンを応答から省くことがあります。返った一覧を完全な履歴として扱わず、「N 世代目」のような通し番号や隣接世代どうしの差分を前提にしないでください。\n\n## Resumable uploads\n\n大きなファイルを分割して送り、切断・プロセス再起動から再開できます。バックエンドのネイティブなレジューム機能の有無に関わらず、`file://` / `gcs://` / `gdrive://` / `memory://` すべてで同じ意味論が得られます。\n\n```ts\nimport { createStorageClient, sourceFromBytes, toFileUri } from \"@aiquants/storage-api\"\n\nconst storage = createStorageClient()\n\n// 途中で切れても、オフセットのずれも、内側で吸収される\nconst resource = await storage.uploadResumable(toFileUri(\"/srv/app/big.bin\"), sourceFromBytes(bytes), {\n    chunkSize: 8 * 1024 * 1024,\n    checksum: { algorithm: \"sha256\", value: digestHex },\n    onProgress: ({ received, totalSize }) => console.log(`${received}/${totalSize}`),\n})\n```\n\n`uploadResumable` のオプション:\n\n| Option | 既定値 | 説明 |\n| --- | --- | --- |\n| `chunkSize` | `DEFAULT_CHUNK_SIZE` (8 MiB) | 1 チャンクのバイト数。サーバの `-max-message-bytes` (既定 64 MiB) 未満にすること |\n| `maxRetries` | `DEFAULT_MAX_RETRIES` (5) | 一時障害時のチャンクあたり再試行回数 (オフセット巻き戻しと予算を共有) |\n| `retryDelayMs` | 指数バックオフ | 再試行 n 回目 (0 始まり) の待機時間を返す関数 |\n| `uploadId` | — | 既存セッションの再開 (下記「プロセスを跨いだ再開」) |\n| `onProgress` | — | チャンク受理ごとのコールバック |\n| `totalSize` | 供給源のサイズ | 期待される最終サイズ (厳密検査が有効になる) |\n| `mimeType` / `keepRevision` | — | 確定オブジェクトへ適用する書き込みメタデータ (Write metadata 参照) |\n| `checksum` | — | `sha256` / `crc32c`。完了時に検証し、失敗時は宛先へ一切書かない |\n| `ttlSeconds` | サーバ既定 | セッション寿命の上書き |\n\n`ResumableSource` は「サイズ」と「任意オフセットからの読み出し」だけを要求します。ストリームではなくこの形なのは、**レジュームには巻き戻しが必須**で、一度きりのストリームでは原理的に再開できないためです。メモリに載せたくない場合は `read` をファイル読み出しで実装してください。\n\n```ts\nconst fileSource: ResumableSource = {\n    size: stat.size,\n    read: async (offset, length) => {\n        const buffer = Buffer.alloc(length)\n        await handle.read(buffer, 0, length, offset)\n        return buffer\n    },\n}\n```\n\n### プロセスを跨いだ再開\n\n`uploadId` を永続化しておけば、別プロセスからでも続きを送れます (セッションは同一 storage-api インスタンスの spool に束縛されるため、同じ `uploadSpoolDir` を共有するサーバに接続すること。再開時に `checksum` / `mimeType` / `keepRevision` / `totalSize` / `ttlSeconds` を指定し直すことはできず、指定するとエラーになります)。\n\n```ts\nconst session = await storage.initiateUpload(uri, { totalSize })\npersist(session.uploadId)\n// ...プロセスが落ちる...\nawait storage.uploadResumable(uri, source, { uploadId: loadPersisted() })\n```\n\n### 契約\n\n| 状況 | 挙動 |\n| --- | --- |\n| `offset == received` | 追記する |\n| `offset < received` (再送) | 重複区間が保存済みバイト列と一致すれば**冪等に成功**、食い違えば `chunk_conflict` |\n| `offset > received` (ギャップ) | `offset_mismatch` を返し、**期待オフセットを添える** |\n| `uploadChunk` が成功して返った | そのバイト列は fsync 済みで、プロセスのクラッシュを跨いで生存する |\n| `completeUpload` | サイズとチェックサムを**宛先へ書く前に**検証する。失敗時はセッションを残すため安全に再試行できる |\n| `abortUpload` | 冪等 (未知の ID でも成功) |\n\n再送が冪等なので、ACK を取りこぼした際の再送は安全です。`uploadResumable` は `offset_mismatch` を受けたら状態照会の往復を挟まずに `expectedOffset` へ即座に追従します。\n\n失敗の分類は `StorageError.resumable` から機械可読に取れます (`resumableFailureOf(error)` は低レベル操作が投げる `StorageError` に対して使います。`uploadResumable` が投げる `ResumableUploadFailedError` では `resumableFailureOf(error.cause)` のように `cause` へ適用してください)。\n\n```ts\nimport { resumableFailureOf } from \"@aiquants/storage-api\"\n\nconst failure = resumableFailureOf(error)\nif (failure?.reason === \"offset_mismatch\") {\n    resumeFrom(failure.expectedOffset)\n}\n```\n\n`reason` は `not_found` / `expired` / `offset_mismatch` / `chunk_conflict` / `checksum_mismatch` / `size_exceeded` / `incomplete` / `unsupported_checksum` のいずれかです。\n\n## Write metadata\n\n`writeFile` / `updateFile` / `uploadResumable` はオブジェクトへ付けるメタデータを受け取ります。**保持できないバックエンドでは無視され、エラーにはなりません。**\n\n| オプション | 効果 | 対応バックエンド |\n| --- | --- | --- |\n| `mimeType` | 保存オブジェクトのコンテンツタイプ | `memory` / `gcs` / `gdrive` (`file` は無視) |\n| `keepRevision` | この書き込みが作るリビジョンを恒久保持 | `gdrive` のみ |\n\n```ts\nawait storage.writeFile(uri, bytes, { mimeType: \"application/pdf\", keepRevision: true })\n```\n\nGoogle Drive は `Files.Update` のたびにリビジョンを作りますが、**バイナリファイルのリビジョンは既定で自動削除の対象**です (`keepForever=false`)。監査や巻き戻しのために履歴を残したい場合は `keepRevision: true` を指定してください。1 ファイルあたりの恒久保持数には Drive 側の上限があります。\n\n## Errors\n\n個別操作は失敗時に `StorageError` を送出します。`code` は Node の errno でも Connect の内部コードでもない安定した列挙値です。例外は高レベル駆動の `uploadResumable` で、再開に必要な文脈 (`uploadId` / `received`) を運ぶ `ResumableUploadFailedError` を送出します (原因の `StorageError` は `cause` に入ります)。\n\n| `code` | 意味 |\n| --- | --- |\n| `not_found` | リソースが存在しない / 未登録スキーム |\n| `is_a_directory` | ファイル指定箇所にディレクトリが渡された |\n| `permission_denied` | プロバイダ境界 (ワークスペースルート外) や OS による拒否 |\n| `invalid_argument` | リクエスト自体が不正 |\n| `out_of_range` | オフセットが有効範囲外 (レジュームアップロード) |\n| `conflict` | 現在の状態と競合 (チャンク矛盾) |\n| `failed_precondition` | 前提状態を満たしていない (期限切れ・未完了) |\n| `data_loss` | データ破損を検出 (チェックサム不一致) |\n| `unavailable` | ストレージサービスへ到達できない |\n| `unimplemented` | バックエンドが当該操作を未実装 |\n| `resource_exhausted` | `readFile` / `readText` のバッファ読み上限 (既定 64 MiB、`maxReadBufferBytes`) の超過。`readStream` を使えば上限なしで読める |\n| `canceled` | 呼び出し側による中断 (AbortSignal / ブラウザ切断)。障害ではない |\n| `unknown` | それ以外 |\n\n```ts\nimport { isStorageError } from \"@aiquants/storage-api\"\n\ntry {\n    await storage.readText(uri)\n} catch (error) {\n    if (isStorageError(error, \"not_found\")) {\n        // ...\n    }\n}\n```\n\n## Configuration\n\n| Option | 環境変数 | 既定値 |\n| --- | --- | --- |\n| `socketPath` | `STORAGE_SOCKET_PATH` | `/tmp/storage.sock` |\n| `workspaceRoot` | `STORAGE_WORKSPACE_ROOT` | (未指定: サーバの実行時カレントディレクトリ) |\n| `uploadSpoolDir` | `STORAGE_UPLOAD_SPOOL_DIR` / `-upload-spool-dir` | `<tmp>/storage-api-uploads` |\n| `binaryPath` | `STORAGE_API_BINARY` | プラットフォームパッケージのバイナリを自動解決 |\n| `autoStart` | — | `true` |\n| `startupTimeoutMs` | — | `10000` |\n| `enableMemoryProvider` | — | `false` (**テスト専用**) |\n| — | `STORAGE_ASSET_ROUTE_PREFIX` | `/assets/` (`file://` の `generateSignedUrl` が返すルート接頭辞) |\n| — | `STORAGE_ASSET_PROXY_PREFIX` | `/api/storage/assets?filePath=` (`gcs://` / `gdrive://` のプロキシ接頭辞) |\n\n> **spool は 1 インスタンスが排他的に確保します** (`flock`)。同一ホストで storage-api を複数立てる場合 (テスト等) は、インスタンスごとに `uploadSpoolDir` を分けてください。既定の共有パスのままだと、2 つ目以降はレジュームアップロードのみ無効化されて起動します (read/write/list は影響を受けません)。\n>\n> `binaryPath` / `STORAGE_API_BINARY` は自前ビルドの差し込み口です。指定しない場合は実行環境に対応するプラットフォームパッケージから解決されます。\n>\n> アセット URL の接頭辞 2 種は環境変数のみで指定します (自動起動時は親プロセスの環境がサーバへ引き継がれます)。ライブラリに消費アプリのルートを焼き込まないための中立的なカスタマイズポイントで、既定値は従来挙動と同一です。\n>\n> **`enableMemoryProvider` は自動起動するサーバへ `-enable-memory-provider` を渡し、`memory://` を登録します。** プロセス内の無制限マップなので、本番で有効化するとメモリ枯渇の的になります。版管理を持つバックエンドをネットワーク無しで検証するためだけのオプションです。既に起動済みのサーバへ接続する場合は起動引数のため効果がありません。\n\n`workspaceRoot` は **自動起動するサーバ** に渡す `-workspace-root` です。既に起動済みのサーバへ接続する場合、そのサーバのルートが優先されます。\n\n## Codegen\n\nプロトコル定義は Go パッケージ側が単一の真実の源です。`.proto` を変更したら以下で TypeScript スタブを再生成してください。\n\n```bash\npnpm --filter @aiquants/storage-api run generate\n```\n\n生成後に Biome で整形するところまでが `generate` に含まれます (protoc プラグインの出力はリポジトリの整形規約と異なるため)。\n\n## License\n\nMIT\n","readmeFilename":""}