Add the explicit spec.action declaration (I1 WP2) #7

Merged
weichen merged 2 commits from feature/agent-stack-i1 into main 2026-10-07 07:41:37 +00:00
Owner

I1 WP2:spec.action 显式声明(四键统一的首选来源)

改动

  • IntentSpec.Action(可选,loader 的 DisallowUnknownFields 自动注册):kind 必须是 command/workflow/blueprint/handler、id 非空,违规则 fail-closed。
  • Candidate.Action 随候选透传;actionOf 推导顺序定为:spec.action → metadata.blueprint → Handler → auto。四种旧动作键全部继续可用(兼容期),新配置应统一走 action。

验证

  • go test ./... 6 包全 ok:显式声明胜端到端(Start 命令携带 workflow 键)、非法 kind 与空 id 拒绝、既有推导路径不回归。

主任务:Dev 仓 feature/agent-stack-i1。

# I1 WP2:spec.action 显式声明(四键统一的首选来源) ## 改动 - `IntentSpec.Action`(可选,loader 的 DisallowUnknownFields 自动注册):kind 必须是 `command/workflow/blueprint/handler`、id 非空,违规则 fail-closed。 - `Candidate.Action` 随候选透传;`actionOf` 推导顺序定为:**spec.action → metadata.blueprint → Handler → auto**。四种旧动作键全部继续可用(兼容期),新配置应统一走 action。 ## 验证 - `go test ./...` 6 包全 ok:显式声明胜端到端(Start 命令携带 workflow 键)、非法 kind 与空 id 拒绝、既有推导路径不回归。 主任务:Dev 仓 `feature/agent-stack-i1`。
weichen added 1 commit 2026-10-07 07:31:05 +00:00
Add the explicit spec.action declaration for action-key unification
ci / vet-and-test (pull_request) Successful in 17s
ci / docker-checkout-hostgateway (pull_request) Successful in 0s
916ee0733f
Why: I1 WP2 - one explicit action field outranks the four legacy
action keys (Handler, metadata.blueprint, command-id, workflow
IntentID) so hosts migrate to a single derivation path.

Evidence: go vet clean; go test ./... all ok, including declared
action winning the Start command and kind/id validation rejections.

Impact: IntentSpec gains Action (command/workflow/blueprint/handler);
Candidate carries it through; actionOf prefers it, then blueprint,
then Handler, then auto. Legacy keys keep working.

Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md I1 WP2
weichen added 1 commit 2026-10-07 07:31:06 +00:00
Add the explicit spec.action declaration for action-key unification
ci / vet-and-test (pull_request) Successful in 17s
ci / docker-checkout-hostgateway (pull_request) Successful in 0s
916ee0733f
Why: I1 WP2 - one explicit action field outranks the four legacy
action keys (Handler, metadata.blueprint, command-id, workflow
IntentID) so hosts migrate to a single derivation path.

Evidence: go vet clean; go test ./... all ok, including declared
action winning the Start command and kind/id validation rejections.

Impact: IntentSpec gains Action (command/workflow/blueprint/handler);
Candidate carries it through; actionOf prefers it, then blueprint,
then Handler, then auto. Legacy keys keep working.

Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md I1 WP2
weichen added 1 commit 2026-10-07 07:41:07 +00:00
Merge origin/main into the I1 branch
ci / vet-and-test (pull_request) Successful in 18s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
0225bdad73
weichen merged commit 2554b509e8 into main 2026-10-07 07:41:37 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Intent#7