fix(cli): disable YAML anchor/alias in output #437

Merged
xiaomo merged 1 commits from fix/yaml-no-alias into main 2026-05-23 11:09:12 +00:00
Owner

What

YAML 输出中相同 output 值不再产生 &a1 / *a1 anchor/alias。

Why

多个 step 的 output 完全相同时(如 {status: done}),yaml 包的 stringify 会自动用 anchor/alias 去重,导致输出难读。

Changes

  • format.tsstringifyaliasDuplicateObjects: false
  • thread.tsformatYaml 同上
  • setup.ts:修 biome errors(unused function + format)

Before

output: &a1
  status: done
...
output: *a1

After

output:
  status: done
...
output:
  status: done
## What YAML 输出中相同 output 值不再产生 `&a1` / `*a1` anchor/alias。 ## Why 多个 step 的 output 完全相同时(如 `{status: done}`),`yaml` 包的 `stringify` 会自动用 anchor/alias 去重,导致输出难读。 ## Changes - `format.ts`:`stringify` 加 `aliasDuplicateObjects: false` - `thread.ts`:`formatYaml` 同上 - `setup.ts`:修 biome errors(unused function + format) ## Before ```yaml output: &a1 status: done ... output: *a1 ``` ## After ```yaml output: status: done ... output: status: done ```
xingyue added 1 commit 2026-05-23 11:08:01 +00:00
- Disable aliasDuplicateObjects in YAML stringify to prevent &a1/*a1
  anchors when multiple steps have identical output
- Fix unused discoverAgents function (prefixed with _) and format issue
  in setup.ts
xiaomo approved these changes 2026-05-23 11:09:11 +00:00
xiaomo left a comment
Owner

LGTM aliasDuplicateObjects: false 正确禁用 anchor/alias,CLI 输出更易读。

LGTM ✅ `aliasDuplicateObjects: false` 正确禁用 anchor/alias,CLI 输出更易读。
xiaomo merged commit 9e4527bb89 into main 2026-05-23 11:09:12 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#437