convert_openclaw() split on `## ` without tracking fenced code blocks, tearing six fenced examples across SOUL.md/AGENTS.md in five agents and leaving dangling fences in each. Implementation from #854 (@guozi-lab): fence helpers in lib.sh used by convert.sh and lint-agents.sh, CommonMark indent aware. Regression test from #853 (@dajiaohuang): every source fenced block must land whole in exactly one output file — verified to fail on the unfixed converter.
Reported by @AmineOzil. Closes#849. Supersedes #853 and #854.
Co-Authored-By: fruit <200041037+guozi-lab@users.noreply.github.com>
Co-Authored-By: Wu Shuwen <108231307+dajiaohuang@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds scripts/test-convert-outputs.sh, the output half of the regression eval
(the install half landed in #828), and wires it plus the previously
un-wired test-agent-selection.sh (#779) into CI.
Why an eval at all: every converter bug so far passed lint and the existing
tests while the installed product was broken. #778 shipped a double-wrapped
description that was valid YAML, so a wrapper check passed; #817 dropped a
whole tool from --parallel and every remaining tool looked fine. Those are
invariant violations, not syntax errors.
Layer A (no history needed), for every agent x every converted tool:
round-trip parsed(generated).description == source description
strict-parse every generated frontmatter / TOML / YAML parses with a real
parser (kimi/vibe carry only an identifier: id == slug and the
prose file exists; aider/windsurf: "## Name" + description line)
count every tool emits exactly one output per roster agent
source every SOURCE frontmatter strict-parses and carries no leaked
quote — the desktop app reads sources with js-yaml (#473)
Layer B: scripts/convert-outputs.sha256, one aggregate hash per tool plus
divisions.json / tools.json / runbooks.json. A flipped line means outputs or a
contract changed; --update regenerates deliberately so review sees the blast
radius. Date-stable (no generated file embeds a date).
The expected side is derived by an INDEPENDENT strict parse of each source,
never by lib.sh's get_field: the generator uses get_field, so an expected
value derived the same way would move with a get_field bug and hide it —
which is exactly how #778 stayed invisible. That independence found two
shipping defects on the first green run:
- get_field returned only the first line of a multi-line plain scalar.
Three healthcare agents write their description as an indented
continuation; every generated output for them shipped it truncated
mid-sentence while the app showed the whole thing. get_field now folds
continuation lines the way YAML does (newline -> single space).
- get_field stripped only "field: " (one space). The same three files use
column-aligned frontmatter (name: X), so their generated names
carried leading whitespace in every tool's output. Plain-scalar padding
is now trimmed.
After both fixes get_field agrees with PyYAML on name and description for
all 273 sources. Acceptance: re-introducing #778's double-wrap, a dropped
tool, a divisions.json change, and an unquoted source each fail the eval
(the double-wrap via Layer A round-trip, not only the manifest).
Refs #778#817#473#810#826#828#779
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Contributors keep reaching for the same fix when a description contains ": "
and breaks YAML frontmatter: double-quote the source scalar (#473 for
zk-steward, re-proposed in #548, and again in #810). #778 fixed the same
problem one layer down by having the converters emit quoted scalars. The two
compose badly: get_field returned a quoted source's quotes as content, so
yaml_quote wrapped them again and every generated file for an already-quoted
agent shipped as description: '"..."' with a literal quote leaking into the
parsed value. zk-steward and ai-data-remediation-engineer are affected on
main today.
get_field now treats one matching outer pair of double or single quotes as
delimiters: it strips them and unescapes (\" -> ", \\ -> \, '' -> '). Quoting a
source description is now safe and harmless, so #473/#548/#810's instinct and
#778's generator-side fix reconcile. Unquoted sources are unchanged.
Verified in a sandbox end-to-end (source -> convert.sh -> parsed YAML):
zk-steward and ai-data-remediation-engineer no longer leak a quote and keep
their internal apostrophes; developer-tooling-engineer (unquoted, contains
": ") is byte-identical to before; synthetic '...''...' and "...\"...\\" cases
unescape correctly. lib.sh is only ever sourced by bash (its shebang); note
`repeat()` at the top of the TUI section is a zsh reserved word, so sourcing
lib.sh from a zsh shell errors — pre-existing and unrelated.
Refs #473#548#810#778
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* feat: installer v2 — selective install, interactive TUI, consolidate cluster
One coherent, dependency-free installer (bash 3.2+, zero deps) that
consolidates 7 conflicting install.sh PRs and fixes#532.
Selective install (compose freely; empty = everything):
- --division / --agent / --agents-file filter across both source tools and
the flat converted outputs via a slug-based allow-set (#157, #487)
- --list [tools|teams|agents] and --dry-run
Install mechanics:
- --link symlink vs copy (#233); --path + env-var fallbacks (#216);
auto-run convert.sh when integration files are missing (#426);
resolve_tool_path dynamic detection (#327); set -e-safe increments (#505)
Interactive wizard (pure bash):
- Tools -> Teams -> Review, arrow-key nav, space toggle, a/n all/none,
live / search, live agent counts, inline OpenCode capacity warning,
alt-screen takeover with trap-based Ctrl-C restore, non-TTY fallback
#532: installing a subset keeps you under OpenCode's ~119 scanner cap
(upstream anomalyco/opencode#27988); installer warns when exceeded; README
documents it.
New scripts/lib.sh holds shared frontmatter/slug helpers (used by
convert.sh too) + ANSI/TUI primitives.
Closes#157, #216, #233, #327, #426, #487, #505.
Co-Authored-By: kienbui1995 <kienbui1995@users.noreply.github.com>
Co-Authored-By: Shiven0504 <Shiven0504@users.noreply.github.com>
Co-Authored-By: rounakkumarsingh <rounakkumarsingh@users.noreply.github.com>
Co-Authored-By: toukanno <toukanno@users.noreply.github.com>
Co-Authored-By: ilyaivasyk <ilyaivasyk@users.noreply.github.com>
Co-Authored-By: Jason2031 <Jason2031@users.noreply.github.com>
Co-Authored-By: ShaoJiaZhen <ShaoJiaZhen@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(installer): robust arrow-key reading (bash 3.2 integer timeouts + SS3)
read_key used a fractional -t 0.01 timeout, which bash 3.2 (/bin/bash on
macOS) doesn't support — so arrow-key escape bytes ([A/[B) leaked through
and were parsed as letter commands (toggling instead of moving). Rewrite
to read the sequence byte-by-byte with integer timeouts and handle both
CSI ([) and SS3 (O) cursor modes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(installer): clear-to-end-of-line per row so frames don't bleed
draw_frame only cleared below the frame (\033[0J), so when a new screen's
lines were shorter than the previous screen's, the old tails (tool paths,
warnings) bled through on the right. Now erase-to-eol (\033[K) on every
line before the screen-clear.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(installer): 2-column grid for Tools/Teams on the Review screen
Replaces the wrapping space-joined 'Tools:'/'Teams:' lines with a compact
column-major 2-column grid (each item on its own line, like the selectors),
so long rosters stay readable and on-screen instead of wrapping.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(installer): Review layout — space after Teams, warning below Install
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(installer): consistent screen layout across all 3 screens
Standard vertical rhythm everywhere: pager -> description -> content ->
selection summary -> navigation -> warnings. Splits the selector footer
into separate summary/nav/warning lines (SEL_SUMMARY_FN/SEL_NAV/
SEL_WARN_FN) and reorders the Review screen to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: kienbui1995 <kienbui1995@users.noreply.github.com>
Co-authored-by: Shiven0504 <Shiven0504@users.noreply.github.com>
Co-authored-by: rounakkumarsingh <rounakkumarsingh@users.noreply.github.com>
Co-authored-by: toukanno <toukanno@users.noreply.github.com>
Co-authored-by: ilyaivasyk <ilyaivasyk@users.noreply.github.com>
Co-authored-by: Jason2031 <Jason2031@users.noreply.github.com>
Co-authored-by: ShaoJiaZhen <ShaoJiaZhen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>