fix(cli): unshadow -y / -f flags and JSON contract for action-less nodes (#370, #421, #422)#439
Open
PeterGuy326 wants to merge 3 commits into
Open
fix(cli): unshadow -y / -f flags and JSON contract for action-less nodes (#370, #421, #422)#439PeterGuy326 wants to merge 3 commits into
PeterGuy326 wants to merge 3 commits into
Conversation
Both commands registered a local --yes flag without the -y shorthand,
shadowing the global persistent -y/--yes so 'dws todo task delete -y'
and 'dws skill setup -y' failed with 'unknown shorthand flag: y'.
Use BoolP("yes","y",...) to match the working drive delete pattern.
…roup nodes (#421, #422) #421: aitable export data registered a local --format flag with the same long name as the global persistent output flag --format/-f, dropping the -f shorthand on that command. Rename the export flag to --export-format (aligns with doc.go); the MCP param key stays "format". #422: action-less group nodes printed human usage text even under -f json, breaking JSON-only consumers. NewGroupCommand now returns a structured validation error (with available subcommands) when the user explicitly requests json/ndjson, while a bare invocation still shows help.
The export flag was renamed from --format to --export-format in aitable_export_import.go (to unshadow the global -f/--format output flag), but the skill reference docs still taught the old --format excel form, which now collides with the global output-format flag. Update the four mono/multi aitable references to match the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three CLI-side flag/output bugs, all verified by build + manual run + unit tests on a fresh
openbuild (v1.0.35 baseline).#370 —
-yshorthand shadowed ontodo task delete/skill setupBoth commands registered a local
--yesflag without the-yshorthand, shadowing the global persistent-y/--yes. Result:dws todo task delete -yanddws skill setup -yfailed withunknown shorthand flag: 'y'.Fix:
Bool("yes", ...)→BoolP("yes", "y", ...), matching the already-correctdrive deletepattern.#421 — local
--formatshadows global-f/--formatonaitable export dataaitable export dataregistered a local--format(export format) with the same long name as the global persistent output flag, dropping the-fshorthand on this command (unknown shorthand flag: 'f').Fix: rename the export flag to
--export-format(aligns withdoc.go's existing--export-format). The MCP request param key stays"format"; help/examples/tests updated.#422 — action-less group nodes print usage text under
-f jsonA group node with no tool of its own (e.g.
chat group member-role) printed human usage text even when-f jsonwas requested, breaking JSON-only agent/MCP consumers.Fix:
NewGroupCommandnow returns a structured validation error (naming the available subcommands) when the user explicitly selectsjson/ndjson(checked viaChanged("format"), mirroringupgrade.go); a bare invocation still shows help, so human discovery UX is unchanged.Out of scope
chat group member-rolebeing an empty shell (its list/add/update/remove tools are orphaned under group namegroup-rolevs the declaredmember-rolein discovery config) is a separate discovery-config issue and will be handled via the discovery release flow, not this code PR.Testing
go build ./...✓go vet ./internal/...✓go test ./internal/cobracmd/... ./internal/compat/... ./internal/helpers/...✓openbuild.