For AI agents: the complete documentation index is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms.txt, the full documentation bundle is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms-full.txt, and this page is available as Markdown at https://scriptedalchemy.github.io/agent-bundle/zh/reference/api.md.
  • 简体中文
  • 类型 API

    符号级参考是从源码生成的,不是手写的。请在类型 API中浏览,或从顶部导航进入。

    它覆盖什么

    每个公开入口点都由其声明生成文档:

    入口点内容
    agent-bundle编写与编排表面:defineSkillcanonicalAgentEventsstartDevServerrunEvalscompareEvals、eval harness 工厂,以及产物清单辅助函数。
    agent-bundle/api程序化编译器:buildvalidateinspectprepack,及其选项与结果类型,以及 AgentComponentKind / componentKindCapability 组件类型辅助。
    agent-bundle/configdefineConfig 与配置类型。
    agent-bundle/test路由测试 harness、匹配器与契约矩阵。
    agent-bundle/test/browser面向浏览器渲染视图的 MCP App bridge harness。
    agent-bundle/evaleval 套件定义、断言与运行对比。
    agent-bundle/rstestRstest 配置助手。
    agent-bundle/meta构建期项目标识常量,编译器会在每个被编译的表面中替换它。
    agent-bundle/mcp-appsMCP App 资源注册表契约,编译器会在本地 MCP 服务器中替换它。
    agent-bundle/cli-entry每个生成的 CLI 可执行文件所基于的路由式 CLI 外壳。
    agent-bundle/mcp-entry每个生成的 MCP 服务器所包裹的 stdio MCP 入口外壳。
    agent-bundle/routes路由模块的编写类型(AgentEventRoutePropsToolRoutePropsCliRouteProps 与各类 config 形状),以及 appResourceUri——对同级 MCP App 的静态引用,编译器会把它解析为该 App 的 resourceUri

    因为它是生成的,所以它始终与已交付的类型一致:签名、联合类型、默认值,以及各表面可能抛出的错误类。 当本参考章节与生成页面不一致时,以生成页面为准。

    生成页面与语言无关

    站点在两个语言下都镜像了这份生成式参考,因此/api//zh/api/对两种语言的读者都能 解析。但其内容未被翻译:符号文档提取自源码注释,并保持在其被编写时所用的语言。

    这是刻意的。生成输出的翻译副本会在第一次重构时就与源码脱节,而一份类型是最新的、散文却已过期的符号参考, 比一份诚实地只用一种语言的参考更糟。手写页面——指南以及本参考的其余部分——则是完整翻译。

    从哪里开始

    • 从脚本中编译:agent-bundle/api 中的 buildvalidate
    • 编写测试:agent-bundle/test 中的 renderRouteexpectDocument 与那些矩阵,在测试中介绍。
    • 编写 eval:agent-bundle/eval 中的 defineEvalSuite 与那些断言,在评测中介绍。