Flow.spec.inputs声明动态稿件,Run.spec.inputBindings锁定本次文件与 hash。Requirement声明Skill、Profile或Adapter的目标环境依赖。- Preflight 分别记录 dependency resolution 与 current-environment readiness。
- Lifecycle Handler 用有限事件声明观察、上报和清理集成。
examples/... 是 Huoban source repo 内的路径,不是文档站链接。
public example 中的依赖
这些 Requirement 分别嵌入 Profile、Adapter 和 Skill,而不是放进 Run 顶层。
examples/inputs/product-idea.md 是一次调用的稿件,不是环境依赖,因此由 Flow input 与 Run input binding 表达。
完整 reporting Adapter
下面逐字取自examples/adapters/stage-reporting-mcp.yaml:
freshness.maxAgeSeconds 只在动态 readiness 得到非-Unknown 结果时产生 validUntil。offline MCP check 不会伪造新鲜度。
完整 reporting Trust
下面逐字取自examples/trust/local-stage-reporting.yaml:
level: unknown。Preflight 即使发现 endpoint,也不会把它提升为 reviewed 或 trusted。
完整 Flow
下面逐字取自examples/flows/idea-to-spec-review.yaml:
stage-reporter role。具体实现必须在 Run binding 中锁定,不能写进 Flow:
复现 dry-run 与默认离线 Preflight
最短命令:tmp/,不会覆盖 committed examples。第二条命令没有传 --offline 或 --live,因此使用默认 offline:
- 更新后的 Run,包含 conditions 与
status.preflightsummary。 Artifact,包含完整、逐项的 Preflight report。
完整 preflighted Run
下面逐字取自examples/generated/idea-to-spec-review-dry-run.yaml:
PreflightReady=True 与 OptionalDependencyUnavailable=True 可以同时成立:best-effort handler 的 checks 是 optional,不阻塞 required gate。
resolution 与 readiness
Preflight 对每项 dependency 分开记录两个结果:
下面是 report 中 MCP Requirement 的完整 check,逐字取自
examples/generated/idea-to-spec-review-preflight-report.yaml:
snapshotHash 哈希 Run.spec。如果 Run.spec 发生变化,采用方必须比较 hash 或重新 Preflight;不要把旧 evidence 当作新 snapshot 的结论。
dryRun 与 execute gate
即使
execute Preflight gate 通过,仍然没有获得授权。当前 CLI 也没有 execute 命令。
stage scope
传入--stage 会生成 stage scope evidence 和 StagePreflightResolved / StagePreflightReady conditions:
PreflightReady=True,也不能授权整个 Run。
--live 的边界
只有明确需要动态 discovery 时才添加:
--live 会访问对象声明的 URL:
- remote context 使用只读
HEAD。 - MCP 使用
initialize、notifications/initialized和有界的tools/list/resources/list。 - 每次 MCP 响应体上限为 1 MiB;最多遍历 20 页。
- 不调用 MCP tool。
- 报告去除 URL user info、query、fragment、常见 credential 形式和远端 MCP error text。
- discovery 成功不改变 Trust,也不批准 side effects。
inferred Requirement
当 Requirement 使用origin: inferred 时,schema 要求 reviewStatus。如果是 needsReview,Preflight 会返回:
needsReview 到 accepted 的自动状态迁移;review 与记录方式由采用方明确实现。
Lifecycle 有限事件
v1alpha1 只允许:
- schema 声明;
- Run role binding;
- Preflight binding / Requirement checks;
explain输出;Run.status.lifecycleInvocations状态形状。
Pending invocation 不会自动迁移。
因此,delivery 在当前仓库只影响 Preflight requiredness:bestEffort 作为 optional evidence,required 参与 required gate。具备 dispatcher 的采用方才负责兑现投递、timeout 与 retry 语义。终态 run.succeeded、run.failed、run.cancelled 只允许 bestEffort;required 收尾使用 run.finalizing。
Lifecycle Event Envelope
事件信封是共享 fragment,不是顶层 Kind。下面逐字取自examples/fragments/checkpoint-requested.lifecycle-event.json:
id。信封不携带 prompt、Profile 正文、secret 或完整输入输出;handler 通过受控引用读取所需 Artifact。