Files
dingtalk-workspace-cli/internal/cli/schema_hints_ding.go
T
玉澜 ec59f7b042 feat(schema): implement dynamic schema on static-endpoint architecture
Restore dynamic dws schema on top of upstream static-endpoint runtime
(v1.0.52) without re-introducing service discovery:
- port schema runtime (runtime_schema/schema_catalog/schema_agent_metadata/
  schema_hints) + embedded agent & interface metadata + ir data structures
- ir/catalog.go: drop discovery-dependent BuildCatalog, keep runtime types
- canonical.go NewSchemaCommand: build schema from the live Cobra tree via
  runtimeSchemaPayload instead of the stub
- add schema_support.go and design doc docs/schema-dynamic-endpoint-design.md

go build ./... passes; go test ./... 44 packages pass (only unrelated
post-goreleaser packaging tests fail with a known tar format issue).
2026-07-11 01:26:22 +08:00

45 lines
1.5 KiB
Go

// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cli
func init() {
RegisterSchemaHints("ding", map[string]ToolSchemaHint{
"send_ding_message": {
Description: "发送 DING 消息给指定用户,支持配置机器人编码、接收人、提醒类型和消息内容。",
Parameters: map[string]ParameterSchemaHint{
"content": {
Description: "DING 消息内容。",
Required: boolPtr(true),
},
"robotCode": {
FlagName: "robot-code",
Description: "DING 机器人编码。通常来自开放平台或应用机器人配置。",
Required: boolPtr(true),
},
"receiverUserIdList": {
FlagName: "users",
Type: "array",
Description: "接收人的 userId 列表。CLI 使用逗号分隔,例如 user1,user2。",
Required: boolPtr(true),
},
"remindType": {
FlagName: "type",
Description: "提醒类型。CLI 默认使用 app,对应应用内提醒。",
Default: "app",
},
},
},
})
}