@cat-factory/provider-s3

中文文档
0.2.493发布于 2026/11/06TypeScriptES Module构建来源已验证近 30 天下载 5722

Opt-in AWS S3 blob backend for the Agent Architecture Board's binary-artifact storage abstraction. Implements the kernel BinaryBlobBackend port over an S3 bucket.

原始使用文档
文档目录6 节
  1. Why this is its own package
  2. Enabling it
  3. Node / local facade
  4. S3-compatible stores
  5. Config ( S3BinaryBlobBackendConfig )
  6. Related

@cat-factory/provider-s3

Opt-in AWS S3 (or S3-compatible) blob backend for cat-factory's binary artifacts: implements the kernel BinaryBlobBackend port over an S3 bucket.

Why this is its own package

The blob backend is pluggable: artifact metadata always lives in the runtime's database, but the bytes can go anywhere (Cloudflare R2, the local filesystem, Postgres, or S3). S3 pulls in the heavy @aws-sdk/client-s3, so it ships as its own opt-in package that only a deployment choosing S3 depends on. Even then, the SDK is imported lazily on first I/O, not at module load: a facade statically imports S3BinaryBlobBackend to wire its container, but a deployment that ends up running the db/fs/no blob backend never pays the SDK's load cost; the SDK is pulled in only when an S3 put/get/delete actually executes.

A store the platform does NOT ship is the same port with one more step: register it on your deployment's BinaryStoreRegistry so an account can select it. See backend/docs/custom-binary-stores.md.

Enabling it

The package exports one class:

  • S3BinaryBlobBackend: a BinaryBlobBackend (put / get / delete) constructed from an S3BinaryBlobBackendConfig.

Node / local facade

The Node facade selects a blob backend by kind in its BuildBlobBackend switch (see backend/runtimes/node/src/container.ts); the s3 case builds this backend from the account's content-storage config:

import { S3BinaryBlobBackend } from '@cat-factory/provider-s3'

case 's3':
  if (!opts.s3) return null
  return new S3BinaryBlobBackend({
    ...opts.s3,                                              // region, bucket, prefix, endpoint, forcePathStyle
    ...(opts.s3Credentials ? { credentials: opts.s3Credentials } : {}),
  })

An account picks the S3 backend (and supplies region / bucket + credentials) in the content-storage settings UI; the facade builds the backend from that config. Omitting credentials is intentional and falls back to the ambient AWS credential chain (instance role, AWS_* env): the right behaviour for a deployment running on AWS with an attached role. (The UI requires explicit keys, so the keyless path is only reached by config written through another channel.)

Runtime reach. S3 is wired on the Node / local facades. The Cloudflare Worker uses R2 as its native blob backend, so it does not pull in @aws-sdk/client-s3. Scaled (multi-replica) Node deployments should prefer s3 over the fs backend, whose local-disk bytes are invisible to other replicas and lost on redeploy.

S3-compatible stores

Point endpoint at a non-AWS S3 API (MinIO, Ceph, etc.) and set forcePathStyle: true (required by most S3-compatible stores). An optional prefix (e.g. artifacts/) is joined to each artifact's storage key.

Config (S3BinaryBlobBackendConfig)

OptionPurpose
regionAWS region (required).
bucketTarget bucket (required).
prefixOptional key prefix, e.g. artifacts/, joined to the artifact's storage key.
endpointOptional custom endpoint for S3-compatible stores (MinIO, etc.).
forcePathStyleForce path-style addressing (needed by most S3-compatible stores).
credentialsExplicit { accessKeyId, secretAccessKey, sessionToken? }; omit to use the default AWS credential chain.

Part of cat-factory's opt-in AWS stack alongside @cat-factory/provider-bedrock (LLM models) and @cat-factory/eks (runner + environment backends). Each is independent and registers into its own seam: mix in only what you use.

版本与发布记录

@cat-factory/provider-s3 共发布 470 个版本,首次发布于 2026/06/29;过去 12 个月发布了 470 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.493latest2026/11/062 天前
0.2.4922026/11/045 天前
0.2.4912026/11/045 天前
0.2.4902026/11/045 天前
0.2.4892026/11/045 天前
0.2.4882026/11/045 天前

关于 @cat-factory/provider-s3 的常见问题

@cat-factory/provider-s3 是什么?

Opt-in AWS S3 blob backend for the Agent Architecture Board's binary-artifact storage abstraction. Implements the kernel BinaryBlobBackend port over an S3 bucket.

如何安装 @cat-factory/provider-s3?

在项目目录运行 npm install @cat-factory/provider-s3,或使用 pnpm add / yarn add / bun add。

@cat-factory/provider-s3 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cat-factory/provider-s3 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cat-factory/provider-s3 可以商用吗?

@cat-factory/provider-s3 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@cat-factory/provider-s3 的下载量有多少?

根据 npm 官方下载统计,@cat-factory/provider-s3 在 2026/10/09 – 2026/11/07 这 30 天内被下载 5,722 次,日均约 191 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cat-factory/provider-s3 还在维护吗?

最新版本 0.2.493 发布于 2026/11/06(2 天前);至今共发布 470 个版本,其中过去 12 个月发布了 470 个;首次发布于 2026/06/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。