Files
dingtalk-workspace-cli/internal/cli/paramdecl_diag_test.go
T
玉澜andCursor 75bd1f1447 refactor(cmdcore): rename SchemaDecl to ContractDecl and unify register seam
SchemaDecl confused authoring with Catalog/ToolSpec delivery. Authors now
declare ContractDecl (nested contract.* types) on Spec/LeafSpec/Shortcut;
AttachContract registers only through cli.RegisterRuntimeContractFinal, and
description provenance stamps cobra_help when Long wins.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 20:33:45 +08:00

29 lines
646 B
Go

package cli_test
import (
"testing"
"github.com/DingTalk-Real-AI/dingtalk-workspace-cli/internal/app"
)
func TestParamDeclAnnotationCompare(t *testing.T) {
root := app.NewSchemaSourceRootCommand()
for _, path := range [][]string{
{"aisearch", "enterprise"},
{"hrbrain", "search", "employees"},
{"chat", "add-emoji"},
} {
cmd, _, err := root.Find(path)
if err != nil || cmd == nil {
t.Logf("%v: NOT FOUND", path)
continue
}
ann := cmd.Annotations["dws.schema.param_decls"]
if ann == "" {
t.Logf("%v: NO param_decls annotation", path)
} else {
t.Logf("%v: HAS param_decls (%d bytes)", path, len(ann))
}
}
}