Documentation
¶
Overview ¶
Package shortcut provides a declarative framework for high-fidelity CLI commands (shortcuts) on top of the DingTalk MCP runtime.
A Shortcut is a curated, thin wrapper over a raw MCP tool call: it declares its flags, validation and execution logic once, and the framework compiles it into a cobra command wired to the shared executor.Runner, output formatting, dry-run and identity handling. This provides a `+command` shortcut layer, but executes through DWS's MCP dispatch instead of a native SDK.
Shortcuts are surfaced as `dws <service> +<command>` (e.g. `dws contact +search-user`). The `+` prefix keeps them visually distinct from the dynamically-discovered MCP leaf commands and from hand-written helper commands.
Index ¶
- Constants
- func AutoPageRequestSize(rt *RuntimeContext, pageSize, itemCount int) int
- func BuiltInCommands() []*cobra.Command
- func Commands() []*cobra.Command
- func EffectiveSafety(s Shortcut) contract.SafetySpec
- func FromShortcut(s Shortcut) corecmd.Spec
- func InPublicCatalog(service, command string) bool
- func PreferredShortcutForCLIPath(cliPath string) (string, bool)
- func PreferredShortcutOwnersSnapshot() map[string]string
- func Register(shortcuts ...Shortcut)
- func ValidateAutoPageControls(rt *RuntimeContext) error
- func WaitAutoPageDelay(rt *RuntimeContext) error
- type Availability
- type Constraint
- type ConstraintKind
- type Flag
- type FlagType
- type HelpTier
- type Risk
- type RuntimeContext
- func (rt *RuntimeContext) AddAIMessageTag(params map[string]any) map[string]any
- func (rt *RuntimeContext) AtLeastOne(flags ...string) error
- func (rt *RuntimeContext) Bool(name string) bool
- func (rt *RuntimeContext) CallMCP(tool string, params map[string]any) error
- func (rt *RuntimeContext) CallMCPData(product, tool string, params map[string]any) (map[string]any, error)
- func (rt *RuntimeContext) CallMCPReadData(product, tool string, params map[string]any) (map[string]any, error)
- func (rt *RuntimeContext) CallMCPWriteData(product, tool string, params map[string]any) (map[string]any, error)
- func (rt *RuntimeContext) CallMCPWriteDataStrict(product, tool string, params map[string]any) (map[string]any, error)
- func (rt *RuntimeContext) Changed(name string) bool
- func (rt *RuntimeContext) Command() *cobra.Command
- func (rt *RuntimeContext) DryRun() bool
- func (rt *RuntimeContext) ExactlyOne(flags ...string) error
- func (rt *RuntimeContext) Int(name string) int
- func (rt *RuntimeContext) IntFirst(primary string, aliases ...string) int
- func (rt *RuntimeContext) MutuallyExclusive(flags ...string) error
- func (rt *RuntimeContext) Output(payload any) error
- func (rt *RuntimeContext) OutputForTool(tool string, payload any) error
- func (rt *RuntimeContext) OutputIncomplete(payload any, terminalErr error) error
- func (rt *RuntimeContext) OutputWithMeta(payload any, meta *output.Meta) error
- func (rt *RuntimeContext) RangeInt(flag string, min, max int) error
- func (rt *RuntimeContext) RequireAll(flags ...string) error
- func (rt *RuntimeContext) Str(name string) string
- func (rt *RuntimeContext) StrFirst(names ...string) string
- func (rt *RuntimeContext) StrSlice(name string) []string
- func (rt *RuntimeContext) Yes() bool
- type SemanticDisposition
- type Shortcut
Constants ¶
const HelpTierAnnotation = "dws.shortcut.help-tier"
HelpTierAnnotation is embedded on mounted Shortcut leaves so the assembled product help can select the reviewed featured subset without inferring from command names or descriptions.
Variables ¶
This section is empty.
Functions ¶
func AutoPageRequestSize ¶ added in v1.0.58
func AutoPageRequestSize(rt *RuntimeContext, pageSize, itemCount int) int
AutoPageRequestSize caps the next lower-page request to the remaining item budget. A cursor returned for that request is therefore safe to resume from: the CLI did not intentionally discard a suffix of the lower page.
func BuiltInCommands ¶
BuiltInCommands compiles only distribution-owned shortcuts.
func Commands ¶
Commands compiles all registered shortcuts into a slice of top-level cobra commands, one per service, each carrying its `+command` leaves. The result is merged into the root command tree by the host application.
func EffectiveSafety ¶ added in v1.0.57
func EffectiveSafety(s Shortcut) contract.SafetySpec
EffectiveSafety returns the exact safety declaration used by the runtime and ContractFinal. Management/listing projections must use this instead of re-inferring confirmation from the legacy Risk enum.
func FromShortcut ¶ added in v1.0.57
adapter.go is the compatibility boundary between Shortcut declarations and the unified command runtime. Shortcut keeps its RuntimeContext and Execute hooks because they own MCP orchestration, while command owns command/flag construction, declarative validation, Schema annotations and confirmation.
Shortcut.Risk remains the legacy runtime confirmation source when Safety is empty. Explicit Safety overrides Risk expansion; Contract is pass-through into ContractFinal when authored.
func InPublicCatalog ¶
InPublicCatalog reports whether a shortcut belongs to the generated public shortcut surface used by help, listing, and skill generation.
func PreferredShortcutForCLIPath ¶ added in v1.0.62
PreferredShortcutForCLIPath returns the reviewed Shortcut-first owner for one exact atomic CLI path. It is product discovery metadata only; command identity and executability continue to come from ContractFinal and Cobra.
func PreferredShortcutOwnersSnapshot ¶ added in v1.0.62
PreferredShortcutOwnersSnapshot returns a defensive copy for exact-set policy tests that keep Schema exclusions aligned with reviewed discovery.
func Register ¶
func Register(shortcuts ...Shortcut)
Register adds one or more shortcuts to the built-in registry. Call from a service package's init().
func ValidateAutoPageControls ¶ added in v1.0.58
func ValidateAutoPageControls(rt *RuntimeContext) error
ValidateAutoPageControls enforces the shared contract while preserving the historical behavior that defaulted controls do not activate pagination.
func WaitAutoPageDelay ¶ added in v1.0.58
func WaitAutoPageDelay(rt *RuntimeContext) error
WaitAutoPageDelay waits between successful pages and remains cancellable so a throttled pagination run cannot ignore command cancellation.
Types ¶
type Availability ¶ added in v1.0.55
type Availability string
Availability is independent from live-account evidence. A missing fixture or permission does not make an implemented command unavailable.
const ( AvailabilityAvailable Availability = "available" AvailabilityDeprecated Availability = "deprecated" )
type Constraint ¶
type Constraint struct {
Kind ConstraintKind `json:"kind"`
Flags []string `json:"flags"`
Description string `json:"description,omitempty"`
// PresenceOnly permits explicit empty values in partial-update constraints.
PresenceOnly bool `json:"presence_only,omitempty"`
}
Constraint declares a shortcut parameter relationship. Known kinds are enforced by the runner; custom constraints are enforced by Validate and must include a concrete Description.
func AutoPageControlConstraints ¶ added in v1.0.58
func AutoPageControlConstraints() []Constraint
AutoPageControlConstraints publishes the runtime-only relationship between the pagination switch and its shared controls into Help and Schema.
type ConstraintKind ¶
type ConstraintKind string
ConstraintKind is a machine-readable cross-parameter or custom validation rule published by `dws shortcut list` and rendered in leaf help.
const ( // ConstraintAtLeastOne requires one or more of Flags. ConstraintAtLeastOne ConstraintKind = "at_least_one" // ConstraintExactlyOne requires exactly one of Flags. ConstraintExactlyOne ConstraintKind = "exactly_one" // ConstraintMutuallyExclusive permits zero or one of Flags. ConstraintMutuallyExclusive ConstraintKind = "mutually_exclusive" // ConstraintCustom documents validation enforced by Shortcut.Validate. ConstraintCustom ConstraintKind = "custom" )
type Flag ¶
type Flag struct {
// Name is the long flag name (kebab-case), e.g. "user-ids".
Name string `json:"name"`
// Shorthand is the optional one-character CLI spelling, e.g. "o" for --output.
Shorthand string `json:"shorthand,omitempty"`
// Type is the value type; defaults to FlagString when empty.
Type FlagType `json:"type"`
// Default is the default value rendered as a string.
Default string `json:"default"`
// Desc is the help text shown in --help.
Desc string `json:"description"`
// Required, when true, makes the framework error if the flag is not set.
Required bool `json:"required"`
// RequiredWhen publishes a conditional-required rule that Required cannot
// express, e.g. "identity=bot" for a credential only mandatory under one
// identity. It is published Schema metadata so an Agent can predict the
// failure; enforcement stays in Validate, which remains authoritative.
RequiredWhen string `json:"required_when,omitempty"`
// Enum, when non-empty, restricts the accepted values (string flags only).
Enum []string `json:"enum"`
// Hidden hides the flag from --help while keeping it usable.
Hidden bool `json:"-"`
// Aliases are hidden executable flag spellings for compatibility. They do
// not create additional Schema parameters; validation and value fallback
// remain attached to the canonical Name. AliasesVisible is a narrow
// compatibility escape hatch for aliases that were historically public.
Aliases []string `json:"-"`
AliasesVisible bool `json:"-"`
// Input declares extra input sources for a string flag beyond the literal
// command-line value: "file" enables @path (value replaced by the file
// content), "stdin" enables - (value replaced by stdin). "@@value" escapes
// to the literal "@value". Resolution happens before Required/Enum/Validate
// checks. Empty = flag value only.
Input []string `json:"input,omitempty"`
}
Flag is a declarative CLI flag definition. The runner registers each Flag onto the generated cobra command, applying defaults, and validates Enum/Required before the Execute hook runs.
func AIMessageTagFlag ¶
func AIMessageTagFlag() Flag
AIMessageTagFlag matches `chat message send --ai-tag`: IM send shortcuts default to tagging delivered messages as AI-sent, while still allowing users to opt out with --ai-tag=false.
func AutoPageControlFlags ¶ added in v1.0.58
func AutoPageControlFlags() []Flag
AutoPageControlFlags returns the shared item and pacing controls used by cursor-based shortcuts. Callers retain ownership of --page-all and their product-specific --page-limit defaults.
type HelpTier ¶ added in v1.0.62
type HelpTier string
HelpTier controls only product-root help presentation. It is deliberately independent from Hidden/public Schema membership: a catalog Shortcut remains Agent-visible and directly executable even when the product root shows only the smaller featured set.
type Risk ¶
type Risk string
Risk classifies the side effect of running a shortcut. It drives whether a confirmation prompt is required before execution (see internal/safety).
const ( // RiskRead is a read-only operation; never prompts. RiskRead Risk = "read" // RiskWrite mutates state; may prompt unless --yes is set. RiskWrite Risk = "write" // RiskHighWrite is a destructive/irreversible operation; requires explicit // confirmation (or --yes) before execution. RiskHighWrite Risk = "high-risk-write" )
type RuntimeContext ¶
type RuntimeContext struct {
// contains filtered or unexported fields
}
RuntimeContext is handed to a Shortcut's Validate and Execute hooks. It wraps the cobra command and exposes typed flag accessors plus a single CallMCP entry point so shortcut authors never touch cobra/executor plumbing directly.
func RuntimeContextForTest ¶ added in v1.0.57
func RuntimeContextForTest(cmd *cobra.Command, s Shortcut) *RuntimeContext
RuntimeContextForTest constructs a RuntimeContext for cross-package tests.
func (*RuntimeContext) AddAIMessageTag ¶
func (rt *RuntimeContext) AddAIMessageTag(params map[string]any) map[string]any
AddAIMessageTag attaches the clawType parameter expected by IM send APIs when the shortcut exposes --ai-tag and the flag is true. This mirrors the native `chat message send` behavior.
func (*RuntimeContext) AtLeastOne ¶
func (rt *RuntimeContext) AtLeastOne(flags ...string) error
AtLeastOne returns a validation error if none of the flags is set.
func (*RuntimeContext) Bool ¶
func (rt *RuntimeContext) Bool(name string) bool
Bool returns the bool value of a flag.
func (*RuntimeContext) CallMCP ¶
func (rt *RuntimeContext) CallMCP(tool string, params map[string]any) error
CallMCP dispatches a single MCP tool call and prints the result, reusing the shared helper path so the shortcut inherits DWS's error classification (auth/PAT/business), dry-run preview and --format/--jq/--fields output for free. The MCP server id is the shortcut's product (defaults to Service).
Most passthrough shortcuts do all their work in one CallMCP call.
func (*RuntimeContext) CallMCPData ¶
func (rt *RuntimeContext) CallMCPData(product, tool string, params map[string]any) (map[string]any, error)
CallMCPData dispatches a read-only tool call to an explicit MCP product and returns the PARSED response as data WITHOUT printing. This is the building block for multi-step ("smart") shortcuts: call a tool, read its output, feed it into the next call. Errors carry DWS's auth/PAT/business classification.
The product is explicit (not the shortcut's own) because smart shortcuts routinely cross services — e.g. resolve a name via `contact` then act via `chat`. Reads run even under --dry-run so a preview can still resolve inputs. Write tools that need parsed responses must use CallMCPWriteData instead. Under --dry-run this path fails closed unless the tool name belongs to the narrow read-only naming contract used by the current MCP registry.
func (*RuntimeContext) CallMCPReadData ¶ added in v1.0.58
func (rt *RuntimeContext) CallMCPReadData(product, tool string, params map[string]any) (map[string]any, error)
CallMCPReadData dispatches a tool whose name is explicitly classified as read-only without consulting Cobra state. Callers must invoke it serially unless the injected ToolCaller separately documents and enforces concurrent safety. Write-shaped tool names fail closed.
func (*RuntimeContext) CallMCPWriteData ¶
func (rt *RuntimeContext) CallMCPWriteData(product, tool string, params map[string]any) (map[string]any, error)
CallMCPWriteData dispatches a write tool call and returns its parsed response. Unlike CallMCPData, it refuses to run under --dry-run so smart shortcuts cannot accidentally perform writes while rendering a preview. For compatibility with existing write shortcuts, an empty text acknowledgement remains an empty map.
func (*RuntimeContext) CallMCPWriteDataStrict ¶ added in v1.0.58
func (rt *RuntimeContext) CallMCPWriteDataStrict(product, tool string, params map[string]any) (map[string]any, error)
CallMCPWriteDataStrict dispatches a write tool call whose contract requires a non-empty JSON business result. An empty acknowledgement is reported as an unknown remote effect so callers can verify it independently before success.
func (*RuntimeContext) Changed ¶
func (rt *RuntimeContext) Changed(name string) bool
Changed reports whether the user explicitly set the flag on the command line.
func (*RuntimeContext) Command ¶
func (rt *RuntimeContext) Command() *cobra.Command
Command returns the underlying cobra command (escape hatch; prefer the typed accessors below).
func (*RuntimeContext) DryRun ¶
func (rt *RuntimeContext) DryRun() bool
DryRun reports whether --dry-run is set (inherited from the root command).
func (*RuntimeContext) ExactlyOne ¶
func (rt *RuntimeContext) ExactlyOne(flags ...string) error
ExactlyOne returns a validation error unless exactly one of the flags is set.
func (*RuntimeContext) Int ¶
func (rt *RuntimeContext) Int(name string) int
Int returns the int value of a flag.
func (*RuntimeContext) IntFirst ¶
func (rt *RuntimeContext) IntFirst(primary string, aliases ...string) int
IntFirst returns the int value for a primary flag plus aliases. Explicitly set aliases are considered before the primary's default, matching native helper compatibility flags such as --size for --limit.
func (*RuntimeContext) MutuallyExclusive ¶
func (rt *RuntimeContext) MutuallyExclusive(flags ...string) error
MutuallyExclusive returns a validation error if more than one of the flags is set. Zero or one set is allowed.
func (*RuntimeContext) Output ¶
func (rt *RuntimeContext) Output(payload any) error
Output prints a (typically reshaped/projected) payload honouring the root --format/--jq/--fields flags. Multi-step shortcuts use it to emit a clean, composed result instead of the raw MCP response — the output-projection output-formatting capability.
func (*RuntimeContext) OutputForTool ¶ added in v1.0.60
func (rt *RuntimeContext) OutputForTool(tool string, payload any) error
OutputForTool stores a once-fetched MCP payload while retaining the tool name for product-specific outcome normalization. It is intended for composite shortcuts that must validate stable identity or collection shape before the shared renderer sees the response; callers must not use it to issue a second business request.
func (*RuntimeContext) OutputIncomplete ¶ added in v1.0.62
func (rt *RuntimeContext) OutputIncomplete(payload any, terminalErr error) error
OutputIncomplete preserves the established partial-result bytes for legacy and dual-validation commands before returning the terminal structured error. Unified commands carry the partial result in the error envelope instead and must not also publish a success-shaped payload.
func (*RuntimeContext) OutputWithMeta ¶ added in v1.0.62
func (rt *RuntimeContext) OutputWithMeta(payload any, meta *output.Meta) error
OutputWithMeta publishes the same business payload as Output while attaching framework-owned metadata to the unified result (or to the dual-validation shadow). Legacy and dual-validation renderers still write the established business payload bytes, so adding pagination evidence here does not change their public output contract.
func (*RuntimeContext) RangeInt ¶
func (rt *RuntimeContext) RangeInt(flag string, min, max int) error
RangeInt validates that an int flag (when set) is within [min, max].
func (*RuntimeContext) RequireAll ¶
func (rt *RuntimeContext) RequireAll(flags ...string) error
RequireAll returns a validation error if any of the flags is not set. Useful for "these flags come as a group" constraints (e.g. --start requires --end).
func (*RuntimeContext) Str ¶
func (rt *RuntimeContext) Str(name string) string
Str returns the trimmed string value of a flag, or "" if unset.
func (*RuntimeContext) StrFirst ¶
func (rt *RuntimeContext) StrFirst(names ...string) string
StrFirst returns the first non-empty string value across a primary flag and its aliases.
func (*RuntimeContext) StrSlice ¶
func (rt *RuntimeContext) StrSlice(name string) []string
StrSlice returns the string-slice value of a flag.
func (*RuntimeContext) Yes ¶
func (rt *RuntimeContext) Yes() bool
Yes reports whether --yes is set (skip confirmation prompts).
type SemanticDisposition ¶ added in v1.0.55
type SemanticDisposition string
SemanticDisposition records the reviewed relationship between a Shortcut and the underlying Runtime Schema surface.
const ( DispositionPrimarySmart SemanticDisposition = "primary_smart" DispositionSemanticAdapter SemanticDisposition = "semantic_adapter" DispositionSchemaLeaf SemanticDisposition = "schema_leaf" DispositionAliasInternal SemanticDisposition = "alias_internal" )
type Shortcut ¶
type Shortcut struct {
// OutputRollout selects the single active output contract for this exact
// command in the current release. It is internal release metadata, never a
// user/Agent flag.
OutputRollout output.RolloutState
// Service is the top-level command group, e.g. "contact". Multiple
// shortcuts sharing a Service are mounted under the same parent command.
Service string
// Command is the leaf name including its "+" prefix, e.g. "+search-user".
Command string
// Aliases are hidden, compatibility-only Cobra spellings for the same
// command identity. Agent-facing Skill and Schema examples must continue to
// use Command; reviewed Schema aliases are declared separately in the
// CommandRegistry.
Aliases []string
// SinglePositionalAliasFor optionally treats one positional argument as the
// value of the named string flag. It is intended only for unambiguous search
// compatibility such as `+chat-search "群名"`; it never changes the
// canonical flag-based contract published to Agents.
SinglePositionalAliasFor string
// Product is the canonical MCP product id used to build the invocation.
// Defaults to Service when empty.
Product string
// Description is the one-line help shown in --help.
Description string
// Intent is a fuller natural-language description of what the command does
// and WHEN to reach for it. Unlike the terse Description, it is written for
// human discovery and AI-agent intent matching (e.g. "当你只知道某人姓名、需要
// 拿到其 userId 以便后续发消息或指派任务时使用"). Surfaced in `--help` (as the
// long description) and in `dws shortcut list`.
Intent string
// Risk classifies the side effect; defaults to RiskRead when empty.
// Kept as the runtime confirmation source when Safety is empty.
Risk Risk
// Safety is an optional explicit Schema/runtime safety declaration. When
// non-empty it overrides Risk expansion in FromShortcut; otherwise Risk
// still drives ConfirmSafety so existing Execute bodies stay unchanged.
Safety contract.SafetySpec
// Contract is the final Agent Contract overlay (selection/interface/dry-run).
// Empty fails Catalog assembly; every Shortcut must declare Contract.
Contract corecmd.ContractDecl
// Flags are the command-specific flags. Global flags are injected separately.
Flags []Flag
// Constraints publish and enforce relationships that individual flags cannot
// express, such as "exactly one of --group and --user". Custom constraints
// describe checks implemented by Validate.
Constraints []Constraint
// Tips are optional usage examples appended to --help.
Tips []string
// Hidden hides the command from listings while keeping it invocable.
Hidden bool
// CompatibilityVisible preserves a historically visible CLI command while
// keeping it out of the Agent/public Shortcut catalog. Such a command is
// shown only by `dws shortcut list --all`; Availability independently says
// whether the historical execution path remains callable.
CompatibilityVisible bool
// Disposition is the reviewed semantic relation to the Runtime Schema leaf
// surface. It determines default Agent discovery independently from live
// fixture evidence.
Disposition SemanticDisposition
// SemanticDelta explains the concrete value added beyond renaming a leaf.
SemanticDelta string
// HelpTier controls whether this public Shortcut is featured on the product
// root help or remains discoverable through Schema/shortcut list/exact help.
// Compatibility and unavailable tiers are never shown on the product root.
HelpTier HelpTier
// Availability describes whether the implementation is shipped and
// callable; it does not encode the current account's permissions.
Availability Availability
// PrimaryCommand links aliases/internal compatibility entries to their
// preferred semantic entry.
PrimaryCommand string
// SemanticReviewed is true only when the disposition and visibility came
// from the reviewed semantic catalog.
SemanticReviewed bool
// UserDefined identifies shortcuts loaded from the user's config
// directory. Distribution-owned Schema and interface snapshots exclude
// these runtime extensions even if another root loaded them earlier.
UserDefined bool
// Validate optionally checks resolved flag values before execution. Return a
// non-nil error to abort with a validation message. Runs after built-in
// Required/Enum checks.
Validate func(rt *RuntimeContext) error
// Execute performs the shortcut. It is required. Typically it builds a
// params map from rt's flags, calls rt.CallMCP, and rt.Output's the result.
Execute func(rt *RuntimeContext) error
}
Shortcut is the declarative definition of a single high-fidelity command.
The zero-value is not usable; Service, Command and Execute are required. The framework injects the global --format/--dry-run/--jq/--yes flags from the root command, so shortcuts must not redeclare them.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agoal declares reviewed shortcuts for DingTalk Agoal.
|
Package agoal declares reviewed shortcuts for DingTalk Agoal. |
|
Package aisearch implements strict, task-oriented Shortcut projections over DingTalk's enterprise search APIs.
|
Package aisearch implements strict, task-oriented Shortcut projections over DingTalk's enterprise search APIs. |
|
Package aitable provides declarative shortcuts for the DingTalk AI 表格 (aitable) service: Base / table / field / record / view / form / dashboard / chart / workflow / advanced-permission / section management.
|
Package aitable provides declarative shortcuts for the DingTalk AI 表格 (aitable) service: Base / table / field / record / view / form / dashboard / chart / workflow / advanced-permission / section management. |
|
Package aitabletarget provides deterministic AI Table URL and name resolution shared by read and write shortcuts.
|
Package aitabletarget provides deterministic AI Table URL and name resolution shared by read and write shortcuts. |
|
Package attendance provides declarative shortcuts for the DingTalk attendance (考勤) service: attendance records, check results/records, approvals, shifts, schedules, class/group/rule management, statistics, settings, reports and vacation.
|
Package attendance provides declarative shortcuts for the DingTalk attendance (考勤) service: attendance records, check results/records, approvals, shifts, schedules, class/group/rule management, statistics, settings, reports and vacation. |
|
Package builtin aggregates all built-in shortcut service packages via blank imports so their init() registrations run, applies the reviewed semantic and public-catalog decorations in the core registry, then re-exports the compiled cobra commands.
|
Package builtin aggregates all built-in shortcut service packages via blank imports so their init() registrations run, applies the reviewed semantic and public-catalog decorations in the core registry, then re-exports the compiled cobra commands. |
|
Package calendar declares the declarative shortcut (+command) layer for the DingTalk calendar MCP product.
|
Package calendar declares the declarative shortcut (+command) layer for the DingTalk calendar MCP product. |
|
Package calendarcompat contains narrow compatibility adapters for observed Calendar wire shapes shared by the calendar and smart Shortcut packages.
|
Package calendarcompat contains narrow compatibility adapters for observed Calendar wire shapes shared by the calendar and smart Shortcut packages. |
|
Package chat provides declarative shortcuts for the DingTalk chat service (群聊 / 会话 / 消息 / 机器人).
|
Package chat provides declarative shortcuts for the DingTalk chat service (群聊 / 会话 / 消息 / 机器人). |
|
Package chatmsg holds the shared, read-only projection helpers for DingTalk message-list responses (list_individual_chat_message, list_conversation_message_v2, search_at_me_message, search_messages_by_keyword, list_topic_replies, …).
|
Package chatmsg holds the shared, read-only projection helpers for DingTalk message-list responses (list_individual_chat_message, list_conversation_message_v2, search_at_me_message, search_messages_by_keyword, list_topic_replies, …). |
|
Package contact provides declarative shortcuts for the DingTalk contact (通讯录) service: user / department / role / relation queries and the HR roster (花名册) lookups.
|
Package contact provides declarative shortcuts for the DingTalk contact (通讯录) service: user / department / role / relation queries and the HR roster (花名册) lookups. |
|
Package devapp declares high-fidelity shortcuts for the DingTalk open-platform developer application ("devapp") MCP service, for the apps command surface.
|
Package devapp declares high-fidelity shortcuts for the DingTalk open-platform developer application ("devapp") MCP service, for the apps command surface. |
|
Package devdoc registers strict Shortcut adapters for DingTalk Open Platform documentation discovery.
|
Package devdoc registers strict Shortcut adapters for DingTalk Open Platform documentation discovery. |
|
Package ding registers strict declarative shortcuts for DingTalk DING.
|
Package ding registers strict declarative shortcuts for DingTalk DING. |
|
Package docresolver resolves document IDs, URLs, and natural titles to one typed document target before a shortcut performs a business operation.
|
Package docresolver resolves document IDs, URLs, and natural titles to one typed document target before a shortcut performs a business operation. |
|
Package drive declares high-fidelity shortcuts for the DingTalk drive (钉盘) service: file/folder listing, metadata, download link, folder creation, upload credentials, search, recycle bin, internet publish and the document space proxy operations (copy/move/rename/permission/recent).
|
Package drive declares high-fidelity shortcuts for the DingTalk drive (钉盘) service: file/folder listing, metadata, download link, folder creation, upload credentials, search, recycle bin, internet publish and the document space proxy operations (copy/move/rename/permission/recent). |
|
Package hrbrain registers fail-closed Shortcut adapters for DingTalk Organization Brain reads.
|
Package hrbrain registers fail-closed Shortcut adapters for DingTalk Organization Brain reads. |
|
Package live defines strict task-oriented Shortcut candidates for DingTalk live broadcasts.
|
Package live defines strict task-oriented Shortcut candidates for DingTalk live broadcasts. |
|
Package mail provides declarative shortcuts for the DingTalk mail (邮箱) service: mailbox / message / draft / thread / folder / tag / user / attachment / template / contact / auto-reply / rule operations.
|
Package mail provides declarative shortcuts for the DingTalk mail (邮箱) service: mailbox / message / draft / thread / folder / tag / user / attachment / template / contact / auto-reply / rule operations. |
|
Package minutes contains declarative shortcuts for DingTalk AI 听记 (minutes).
|
Package minutes contains declarative shortcuts for DingTalk AI 听记 (minutes). |
|
Package minutesdata owns response validation and pagination facts shared by Minutes shortcuts.
|
Package minutesdata owns response validation and pagination facts shared by Minutes shortcuts. |
|
Package oa registers strict declarative shortcuts for DingTalk OA approval.
|
Package oa registers strict declarative shortcuts for DingTalk OA approval. |
|
Package pat registers safe Shortcut routing for PAT authorization tasks.
|
Package pat registers safe Shortcut routing for PAT authorization tasks. |
|
Package report registers strict declarative shortcuts for DingTalk reports.
|
Package report registers strict declarative shortcuts for DingTalk reports. |
|
Package responsecheck contains fail-closed response validators shared by built-in shortcuts.
|
Package responsecheck contains fail-closed response validators shared by built-in shortcuts. |
|
Package sheet declares high-fidelity shortcuts for the DingTalk sheet MCP product.
|
Package sheet declares high-fidelity shortcuts for the DingTalk sheet MCP product. |
|
Package smart holds genuine multi-step / intelligent shortcuts — commands that orchestrate several MCP calls or resolve names to IDs, so they are NOT a 1:1 wrapper over a single tool.
|
Package smart holds genuine multi-step / intelligent shortcuts — commands that orchestrate several MCP calls or resolve names to IDs, so they are NOT a 1:1 wrapper over a single tool. |
|
Package targetresolver provides deterministic natural-target resolution for shortcuts.
|
Package targetresolver provides deterministic natural-target resolution for shortcuts. |
|
Package todo declares high-fidelity shortcuts for the DingTalk "todo" (personal todo) MCP service.
|
Package todo declares high-fidelity shortcuts for the DingTalk "todo" (personal todo) MCP service. |
|
Package usage records the SHAPE of MCP tool calls (which product/tool, which argument keys, and a redacted sample of ID/enum-like values) so that the shortcut layer can later mine high-frequency patterns and suggest distilling them into custom shortcuts (see docs/shortcut-p2-design.md).
|
Package usage records the SHAPE of MCP tool calls (which product/tool, which argument keys, and a redacted sample of ID/enum-like values) so that the shortcut layer can later mine high-frequency patterns and suggest distilling them into custom shortcuts (see docs/shortcut-p2-design.md). |
|
Package userdef loads user-defined shortcuts from ~/.dws/shortcuts/*.yaml and compiles them into the same shortcut.Shortcut model as the built-ins, so a distilled high-frequency operation behaves exactly like a native `+command`.
|
Package userdef loads user-defined shortcuts from ~/.dws/shortcuts/*.yaml and compiles them into the same shortcut.Shortcut model as the built-ins, so a distilled high-frequency operation behaves exactly like a native `+command`. |
|
Package whiteboard declares strict Shortcut adapters for DingTalk document whiteboards.
|
Package whiteboard declares strict Shortcut adapters for DingTalk document whiteboards. |
|
Package wiki declares reviewed, truth-preserving shortcuts for Wiki spaces, members, nodes, and activity feeds.
|
Package wiki declares reviewed, truth-preserving shortcuts for Wiki spaces, members, nodes, and activity feeds. |