# ai-base **Repository Path**: synovation/ai-base ## Basic Information - **Project Name**: ai-base - **Description**: 面向 AI Agent 的可验证、可追踪、可升级应用能力基础设施。 - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-03 - **Last Updated**: 2026-08-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
稳定的能力语义,灵活且归项目所有的实现。
English · 中文
# AIBA AIBA 是一套面向 Agent 的软件能力交付系统。它帮助 AI Agent 为项目添加、验证、 追踪和升级完整能力,同时不把项目锁定在固定的应用框架、服务商或视觉体系中。 首批能力包括 `review-access`、`identity`、`audit`、`authorization`、 `users`、`notification`、`file-assets`、`import-export` 和 `vehicle-records`。 `wechat-miniprogram-auth` 是首个平台服务商集成能力。 能力目录按五层扩展: 应用基础能力、平台集成能力、业务通用能力、工程治理能力和行业组合方案。AIBA 目前支持 Agent 辅助安装、确定性的证据与来源验证、漂移检查、感知定制的升级、签名能力包、 私有 Registry 认证下载、验证缓存和防回滚解析。可选的项目治理机制还能为安装和 升级的最终确认增加带签名、绑定证据的团队审批。 [在线观看车辆管理后台演示](https://grubbylee.github.io/ai-base/video/),了解 AIBA 和 Codex 如何从空目录 开始,完成一个可操作、可独立验证的管理后台。 ## 原则 - 能力语义稳定,实现方式灵活。 - 确定性的证据与来源验证,AI 辅助适配。 - 生成代码归项目所有。 - 变更可追踪,能力可升级。 - Core 保持独立,Agent Skill 只做轻量适配。 ## 仓库结构 - `docs/`:愿景、架构、RFC、路线图和任务进度。 - `packages/spec`:语言无关的 Schema 和 TypeScript 协议类型。 - `packages/core`:项目检查、能力加载、来源追踪和验证。 - `packages/cli`:`aiba` 命令行界面。 - `packages/registry-server`:带认证的只读参考 Registry。 - `capabilities/`:官方能力包。 - `solutions/`:绑定精确版本并按依赖顺序排列的行业能力组合。 - `integrations/`:Agent 专用适配器。 - `fixtures/`:一致性与攻击测试参考项目,包括原生微信小程序和集成核心能力的 安全测试语料。 ## 开发 ```bash pnpm install pnpm check node packages/cli/dist/index.js init /path/to/project node packages/cli/dist/index.js inspect . node packages/cli/dist/index.js add review-access --root /path/to/project node packages/cli/dist/index.js add review-access --finalize --root /path/to/project node packages/cli/dist/index.js diff review-access --root /path/to/project node packages/cli/dist/index.js upgrade review-access \ --root /path/to/project --packs-dir /path/to/target-packs node packages/cli/dist/index.js upgrade review-access --finalize \ --root /path/to/project --packs-dir /path/to/target-packs node packages/cli/dist/index.js verify review-access \ --root fixtures/review-access-reference \ --packs-dir capabilities node packages/cli/dist/index.js compose vehicle-management \ --root fixtures/identity-reference --packs-dir capabilities node packages/cli/dist/index.js add vehicle-management --solution \ --root /path/to/project node packages/cli/dist/index.js add vehicle-management --solution --finalize \ --agent codex --root /path/to/project node packages/cli/dist/index.js add wechat-miniprogram-auth \ --root /path/to/project aiba keygen aiba-official --out ../aiba-publisher-keys aiba pack identity --publisher aiba-official --key-id root-1 \ --private-key ../aiba-publisher-keys/private.pem --out identity.aiba aiba verify-bundle identity.aiba --trust trust-policy.json aiba registry-add identity.aiba --registry ./registry \ --publisher-trust publisher-trust.json aiba registry-index ./registry --id local-registry \ --publisher registry-operator --key-id root-1 \ --private-key ../registry-keys/private.pem \ --publisher-trust publisher-trust.json --sequence 1 \ --expires-at 2026-07-27T00:00:00Z aiba resolve identity --registry ./registry \ --registry-trust registry-trust.json \ --publisher-trust publisher-trust.json AIBA_REGISTRY_TOKEN=... aiba registry-serve ./registry \ --registry-trust registry-trust.json \ --publisher-trust publisher-trust.json \ --tls-cert fullchain.pem --tls-key private.pem AIBA_REGISTRY_TOKEN=... aiba fetch identity \ --registry-url https://registry.example.com \ --registry-trust registry-trust.json \ --publisher-trust publisher-trust.json aiba policy-init --id product-team --approver release-manager \ --key-id root-1 --public-key ../approver-keys/public.pem \ --capability identity review-access aiba approve identity --approver release-manager --key-id root-1 \ --private-key ../approver-keys/private.pem aiba policy-check identity --agent codex ``` ## 安装 ```bash npm install --global @grubbylee/aiba aiba list aiba show identity aiba init aiba add vehicle-management --solution aiba inspect aiba compose vehicle-management ``` 作用域包同样会安装 `aiba` 可执行命令。npm 发行包包含官方能力包和行业组合方案。作为库使用时, 也可以分别安装 `aiba-core`、`aiba-spec` 或 `aiba-registry-server`。 ## 工作方式 最简产品流程是: ```bash aiba init aiba list aiba show vehicle-management aiba add vehicle-management --solution aiba inspect aiba verify aiba compose vehicle-management ``` 完整的 M3 安全基座需要依次安装并适配 `identity`、`audit`、`authorization`、 `users` 和 `notification`;依赖检查会拒绝错误顺序。每次 `add` 先生成 Agent 计划,项目测试通过后再由 `--finalize` 记录 Core 计算出的来源信息。 `add` 和 `upgrade` 默认只准备有边界的操作计划。Agent 负责适配项目并提交证据或 冲突处理结果;Core 在 `--finalize` 阶段计算哈希并验证。能力包始终作为数据处理, 不能向 Core 提供待执行命令。 `compose` 是只读的证据与来源检查。方案把每个组成能力绑定到精确版本和 Manifest 哈希,要求完整依赖闭包和正确安装顺序,并对每个能力执行原有项目验证。方案不能把 必需依赖改成可选,也不能忽略任何组成能力的不变量。 `add