Documentation
¶
Overview ¶
Package dws is the module-root package. Its sole purpose is to bake the skills/ documentation tree into the binary at build time so that `dws skill setup` installs the skill version shipped with THIS binary, independent of any local checkout. See internal/app/skill_setup.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbeddedSkills embed.FS
EmbeddedSkills holds only the installable mono and multi skill trees compiled into the binary. Build-only inputs such as internal/cli/schema_hints are intentionally excluded. The `all:` prefix is required so dot/underscore entries — e.g. references/best_practices/_common — are included rather than skipped.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
interface-snapshot
command
interface-snapshot is an internal CI helper.
|
interface-snapshot is an internal CI helper. |
|
internal
|
|
|
apiclient
Package apiclient provides a lightweight HTTP client for calling DingTalk OpenAPI (https://api.dingtalk.com) directly, bypassing the MCP JSON-RPC transport.
|
Package apiclient provides a lightweight HTTP client for calling DingTalk OpenAPI (https://api.dingtalk.com) directly, bypassing the MCP JSON-RPC transport. |
|
auth
agent_code_detect.go resolves the agent_code — which agent HOST is driving dws (claudecode / qoder / cursor / vscode / openclaw / hermes / ...).
|
agent_code_detect.go resolves the agent_code — which agent HOST is driving dws (claudecode / qoder / cursor / vscode / openclaw / hermes / ...). |
|
cobracmd
Package cobracmd provides shared Cobra command utilities used across multiple internal packages (app, cli, compat, helpers).
|
Package cobracmd provides shared Cobra command utilities used across multiple internal packages (app, cli, compat, helpers). |
|
event
Package event implements the DingTalk Stream event subscription pipeline for dws.
|
Package event implements the DingTalk Stream event subscription pipeline for dws. |
|
event/bus
Package bus implements the daemon side of the dws event subsystem: one long-lived process per ClientID that holds the single cloud connection and fans out events to N local consumers over IPC.
|
Package bus implements the daemon side of the dws event subsystem: one long-lived process per ClientID that holds the single cloud connection and fans out events to N local consumers over IPC. |
|
event/busctl
Package busctl glues the consume client to the bus daemon.
|
Package busctl glues the consume client to the bus daemon. |
|
event/consume
Package consume implements the consumer-side process of `dws event consume`: dial the bus, send Hello, read Event frames, format them, and write them out (stdout / file / dir).
|
Package consume implements the consumer-side process of `dws event consume`: dial the bus, send Hello, read Event frames, format them, and write them out (stdout / file / dir). |
|
event/dedup
Package dedup implements a fixed-capacity LRU set used by the bus to suppress duplicate events that the DingTalk Stream SDK redelivers on reconnect (see plan invariant #2).
|
Package dedup implements a fixed-capacity LRU set used by the bus to suppress duplicate events that the DingTalk Stream SDK redelivers on reconnect (see plan invariant #2). |
|
event/lock
Package lock implements a cross-platform exclusive file lock primitive used by the bus daemon to enforce the "single bus per ClientID" invariant (plan invariant #3).
|
Package lock implements a cross-platform exclusive file lock primitive used by the bus daemon to enforce the "single bus per ClientID" invariant (plan invariant #3). |
|
event/process
Package process provides cross-platform process-existence checks.
|
Package process provides cross-platform process-existence checks. |
|
event/registry
Package registry holds two cross-cutting reference data sets used by daemon, consume, and the cobra command layer:
|
Package registry holds two cross-cutting reference data sets used by daemon, consume, and the cobra command layer: |
|
event/source
Package source wraps the open-dingtalk Stream SDK and exposes a small blocking Start interface plus a connection state machine.
|
Package source wraps the open-dingtalk Stream SDK and exposes a small blocking Start interface plus a connection state machine. |
|
event/transport
Package transport implements the cross-platform local IPC between the bus daemon and consume clients.
|
Package transport implements the cross-platform local IPC between the bus daemon and consume clients. |
|
generator/cmd_schema_catalog
command
|
|
|
generator/cmd_schema_registry_smoke
command
Command cmd_schema_registry_smoke emits the complete public binary-smoke vector from EffectiveCommandRegistry.
|
Command cmd_schema_registry_smoke emits the complete public binary-smoke vector from EffectiveCommandRegistry. |
|
generator/outputguard
Package outputguard prevents generators from overwriting reviewed or generated inputs that participate in the same one-way build graph.
|
Package outputguard prevents generators from overwriting reviewed or generated inputs that participate in the same one-way build graph. |
|
i18n
Package i18n provides lightweight internationalization for the DWS CLI.
|
Package i18n provides lightweight internationalization for the DWS CLI. |
|
interfacesnapshot
Package interfacesnapshot captures and compares the public Cobra command surface without executing commands or contacting runtime services.
|
Package interfacesnapshot captures and compares the public Cobra command surface without executing commands or contacting runtime services. |
|
keychain
Package keychain provides cross-platform secure storage for secrets.
|
Package keychain provides cross-platform secure storage for secrets. |
|
logging
Package logging provides file-based structured logging for diagnostics.
|
Package logging provides file-based structured logging for diagnostics. |
|
pat
Package pat implements the "dws pat" command group for PAT (Personal Action Token) authorization management.
|
Package pat implements the "dws pat" command group for PAT (Personal Action Token) authorization management. |
|
plugin
Package plugin implements the DWS CLI plugin system.
|
Package plugin implements the DWS CLI plugin system. |
|
shortcut
Package shortcut provides a declarative framework for high-fidelity CLI commands (shortcuts) on top of the DingTalk MCP runtime.
|
Package shortcut provides a declarative framework for high-fidelity CLI commands (shortcuts) on top of the DingTalk MCP runtime. |
|
shortcut/aitable
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. |
|
shortcut/attendance
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. |
|
shortcut/builtin
Package builtin aggregates all built-in shortcut service packages via blank imports so their init() registrations run, then re-exports the compiled cobra commands.
|
Package builtin aggregates all built-in shortcut service packages via blank imports so their init() registrations run, then re-exports the compiled cobra commands. |
|
shortcut/calendar
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. |
|
shortcut/chat
Package chat provides declarative shortcuts for the DingTalk chat service (群聊 / 会话 / 消息 / 机器人).
|
Package chat provides declarative shortcuts for the DingTalk chat service (群聊 / 会话 / 消息 / 机器人). |
|
shortcut/contact
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. |
|
shortcut/devapp
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. |
|
shortcut/ding
Package ding holds the built-in DING (钉) shortcuts.
|
Package ding holds the built-in DING (钉) shortcuts. |
|
shortcut/doc
Package doc declares the high-fidelity `dws doc +<command>` shortcuts.
|
Package doc declares the high-fidelity `dws doc +<command>` shortcuts. |
|
shortcut/drive
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). |
|
shortcut/mail
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. |
|
shortcut/minutes
Package minutes contains declarative shortcuts for DingTalk AI 听记 (minutes).
|
Package minutes contains declarative shortcuts for DingTalk AI 听记 (minutes). |
|
shortcut/oa
Package oa registers declarative shortcuts for the DingTalk OA approval service, wrapping the raw MCP tools exposed by the dws oa helper.
|
Package oa registers declarative shortcuts for the DingTalk OA approval service, wrapping the raw MCP tools exposed by the dws oa helper. |
|
shortcut/report
Package report declares declarative shortcuts for the DingTalk "报告/日志" (OA 周报应用) MCP tools.
|
Package report declares declarative shortcuts for the DingTalk "报告/日志" (OA 周报应用) MCP tools. |
|
shortcut/sheet
Package sheet declares high-fidelity shortcuts for the DingTalk sheet MCP product.
|
Package sheet declares high-fidelity shortcuts for the DingTalk sheet MCP product. |
|
shortcut/smart
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. |
|
shortcut/todo
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. |
|
shortcut/usage
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). |
|
shortcut/userdef
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`. |
|
shortcut/wiki
Package wiki declares high-fidelity shortcuts for the DingTalk wiki (knowledge base) service: space management, member management and node management.
|
Package wiki declares high-fidelity shortcuts for the DingTalk wiki (knowledge base) service: space management, member management and node management. |
|
syncdata
Package syncdata holds the wukong product registry, synced from dws-wukong.
|
Package syncdata holds the wukong product registry, synced from dws-wukong. |
|
upgrade
Package upgrade provides self-update functionality for the DWS CLI using GitHub Releases as the data source.
|
Package upgrade provides self-update functionality for the DWS CLI using GitHub Releases as the data source. |
|
pkg
|
|
|
asynctask
Package asynctask 封装"提交 → 渐进式退避轮询 → (可选) 下载"模式,复用给 doc export / sheet export / aitable export 三个产品。
|
Package asynctask 封装"提交 → 渐进式退避轮询 → (可选) 下载"模式,复用给 doc export / sheet export / aitable export 三个产品。 |
|
authretry
Package authretry exposes the AuthRefreshRequired marker error used by edition overlays (in separate Go modules) to signal "the current access token was rejected by the server; please run a force-refresh and retry".
|
Package authretry exposes the AuthRefreshRequired marker error used by edition overlays (in separate Go modules) to signal "the current access token was rejected by the server; please run a force-refresh and retry". |
|
cli
Package cli exposes public entry points for the DWS CLI so that external overlay modules can embed and launch the CLI after customising edition hooks.
|
Package cli exposes public entry points for the DWS CLI so that external overlay modules can embed and launch the CLI after customising edition hooks. |
|
cmdutil
Package cmdutil provides reusable CLI helper functions for Cobra commands.
|
Package cmdutil provides reusable CLI helper functions for Cobra commands. |
|
config
Package config provides shared constants used across multiple internal packages.
|
Package config provides shared constants used across multiple internal packages. |
|
configmeta
Package configmeta provides a central registry of all environment-variable based configuration items used by the DWS CLI.
|
Package configmeta provides a central registry of all environment-variable based configuration items used by the DWS CLI. |
|
convert
Package convert provides shared type conversion helpers used across multiple internal packages (cli, compat).
|
Package convert provides shared type conversion helpers used across multiple internal packages (cli, compat). |
|
edition
Package edition provides an extension-point mechanism that allows private overlay modules (e.g.
|
Package edition provides an extension-point mechanism that allows private overlay modules (e.g. |
|
editiontest
Package editiontest provides contract-test helpers that any edition.Hooks implementation (open-source or overlay) must satisfy.
|
Package editiontest provides contract-test helpers that any edition.Hooks implementation (open-source or overlay) must satisfy. |
|
paging
Package paging 提供跨产品复用的"自动翻页"工具,封装"取一页 → 取下一页 cursor → 继续取"循环。
|
Package paging 提供跨产品复用的"自动翻页"工具,封装"取一页 → 取下一页 cursor → 继续取"循环。 |
|
runtimetoken
Package runtimetoken resolves API bearer tokens for features that bypass the MCP runner (e.g.
|
Package runtimetoken resolves API bearer tokens for features that bypass the MCP runner (e.g. |
|
validate
Package validate provides input sanitization and validation functions to prevent injection attacks (control characters, CRLF, Unicode spoofing, ANSI escape sequences) at the CLI boundary.
|
Package validate provides input sanitization and validation functions to prevent injection attacks (control characters, CRLF, Unicode spoofing, ANSI escape sequences) at the CLI boundary. |
|
scripts
|
|
|
policy/coverage-gate
command
Command coverage-gate enforces non-regressing overall coverage and a strict threshold for executable statements changed by the current PR.
|
Command coverage-gate enforces non-regressing overall coverage and a strict threshold for executable statements changed by the current PR. |
|
policy/interface-baseline
command
Command interface-baseline snapshots and checks the backwards-compatible public Cobra surface of DWS CLI.
|
Command interface-baseline snapshots and checks the backwards-compatible public Cobra surface of DWS CLI. |
|
policy/schema-compat
command
Command schema-compat normalizes and checks the backwards-compatible execution contract returned by `dws schema --all --format json`.
|
Command schema-compat normalizes and checks the backwards-compatible execution contract returned by `dws schema --all --format json`. |
|
policy/skill-command-check
command
Command skill-command-check verifies that executable `dws ...` references in published skill Markdown resolve against the current Cobra command tree.
|
Command skill-command-check verifies that executable `dws ...` references in published skill Markdown resolve against the current Cobra command tree. |
|
Package skills embeds the dws skill sources into the binary so that `dws skill setup` always installs the skill set matching the running binary version, regardless of the working directory.
|
Package skills embeds the dws skill sources into the binary so that `dws skill setup` always installs the skill set matching the running binary version, regardless of the working directory. |
Click to show internal directories.
Click to hide internal directories.