Discover slash commands for Kimi and OpenCode (#22)
* fix: dispatch kimi and opencode panes through the reportedAgent fallback CatalogFor and CatalogForProfile each carried their own agent-name switch, and the two had drifted: CatalogFor mapped kimi and opencode, the reportedAgent fallback in CatalogForProfile did not. The relay passes an empty profileID whenever the agent's own binary is missing from the service PATH - the norm under launchd's minimal environment - so for those two kinds the fallback found no provider, execution fell through to discoverGenericSkills(nil, ""), and the pane got an empty palette: not even builtins. Measured through the server's own call shape, a kimi pane lost 80 commands and an opencode pane lost 17. Both entrypoints now resolve through one profileIDForAgentName table, so the mapping cannot drift again. The existing TestCatalogForExactDispatch could not catch this, because CatalogFor supplies the profileID itself and never reaches the fallback. The new test asserts the shape internal/app/server.go actually produces - an empty profileID plus a reportedAgent - for every name the dispatch table covers. Against the previous catalog.go it fails on exactly the seven kimi and opencode aliases. * feat: fold YAML block scalars in skill frontmatter The frontmatter key pattern captured only the remainder of the key's own line, so a block scalar - description: | - parsed to the literal value "|". Eleven skills on a developer machine render that way, and a one-character description also defeats the rule that drops skills without one. Fold a block scalar's indented continuation lines into the value: literal blocks join with newlines, folded blocks with spaces, common indentation is stripped, and the block ends at the next unindented key or the closing fence. Chomping indicators are recognised but not honoured because every consumer already collapses whitespace. A malformed block yields an empty value, so the skill is dropped rather than shown with garbage. * test: pin that the recursive command walk cannot loop on a symlink walkDirBudget's safety currently rests on skipping symlinks outright, which was only stated in a comment. This fixture - a link pointing at an ancestor - fails against a version that follows symlinked directories without threading real-path de-duplication through the recursion, so the invariant is now enforced rather than described. * fix slash command block frontmatter --------- Co-authored-by: Christophe Vidal <christophe.vidal.1983@gmail.com>
K
Kiryl Berasneu committed
a290f57747ebf97bdb98dc0bc220bf89dc31b173
Parent: 7e6ced8
Committed by GitHub <noreply@github.com>
on 8/29/2026, 6:02:45 AM