这条路径使用 minimal-app,因为它是当前 CLI 明确提供并能解释其来源、生成物和检查项的 recipe。它会建立一个完整切片,而不是伪装成纯 AUP app。
先查看 recipe 的边界
arc blocklet recipe explain minimal-app在 2.0.0-beta.25 上,输出说明它包含 web、aup、agent 和 settings 四项 capability,并列出 source DSL、AFS data、兼容产物与 profile check。
建立 app
arc blocklet create ./hello-aup --recipe minimal-app --name hello-aup本页验证时,CLI 确认创建了 18 个文件,并给出一条针对创建后绝对路径的下一步验证命令。创建目录会因你的当前位置而不同,因此不要把输出中的绝对路径当成教程常量。
Created minimal app blocklet "hello-aup" with 18 file(s).生成后,先阅读这些来源而不是改生成物:
| 文件 | 角色 |
|---|---|
.aup/app.aup | AUP app 的 DSL 来源 |
pages/index/layout.aup | Web 页面布局的 DSL 来源 |
.web/components/app-hero/component.dsl | 站点组件 manifest 的 DSL 来源 |
agents/app-agent/agent.dsl | agent manifest 的 DSL 来源 |
seed/settings/.../settings.aup | settings 来源 |
recipe 同时写出某些 JSON compatibility artifact,但不会预先物化 .aup/app.json、.aup/pages/*.json 或 .aup/wrapper.json。如果你的消费者明确要求这些 artifact,读 生成、lint 与迁移;不要在没有需要时手改它们。
继续到 验证、运行与查看。