dingtalk-shared
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDWS 共享执行契约
DWS Shared Execution Contract
本文件只在泛称 DWS、跨产品流程、URL 预检或意图不清时作为入口。明确单产品请求直接使用对应 skill;已经内嵌最小执行契约的产品根 Skill 不需要先完整读取本文件。
<!-- DWS_RUNTIME_CONTRACT_START -->dingtalk-*This file only serves as an entry point when DWS, cross-product flows, URL pre-check, or ambiguous intent is involved. For clear single-product requests, directly use the corresponding skill; product root skills that already embed a minimal execution contract do not need to fully read this file first.
<!-- DWS_RUNTIME_CONTRACT_START -->dingtalk-*最小 DWS 执行契约
Minimal DWS Execution Contract
- 只用 ;结构化读取加
dws,按真实返回判断。--format json - 已知命令直调;参数/约束/安全不明查 leaf 窄 Schema。Schema 不可用才读已知 leaf Help 一次;用同 leaf Help 修正一次。
unknown flag不查 Help:优先错误中的明确 suggestion,其次已加载 Skill/reference 中的明确兼容入口;均无则报漂移并停,禁全 Catalog。低频 reference 不默认 Help,禁 root/parent/product Help。发现后必须执行或说明阻塞。unknown command - 不猜命令/flag/字段/ID/账号/业务事实;ID 来自真实返回。目标零命中/多候选/类型不明先消歧;仅可选时间/展示范围用契约默认,缺必需信息即停。
- 解析/读/写同一 profile,ID 不跨组织。多账号只用唯一 ;否则用户指定,禁止选择第一项、最近登录或最近使用账号。
isOrgCurrent=true - 不输出/记录 token、refresh token、appSecret、webhook token;已注入认证时不索要。
- 写须符合明确意图;确认以最终 Runtime gate/Schema 为准,确认后才加 。
--yes - 写后验证结果,不凭退出码宣称成功。退出须最终答复,区分完成、部分、阻塞、待确认、失败;保留已有数据及 。
complete/hasMore/stopReason/failures - 时间戳按会话时区展示,必要时保留原值。
- 认证/权限/profile/confirmation/未知错误只读 对应 reference,禁连续猜替代命令。
dingtalk-shared
国际版、海外版或 区域登录必须执行 (无头环境再加 ); 只用于登录,后续业务命令按所选 profile 自动路由。
.iodws auth login --intl--device--intl产品或跨产品规则在最小契约之上增量加载。用户已明确产品内容意图时,意图优先于 URL 形态;多账号选择与跨组织规则读取 。本地文件、产品边界和跨产品传递规则只在对应任务中加载,避免把全局手册放入每个单产品请求。
../dingtalk-misc/references/profile.md- Only use ; for structured reads add
dwsand judge based on the actual response.--format json - Directly invoke known commands; if parameters/constraints/security are unclear, consult the leaf narrow Schema. Only read the known leaf Help once if the Schema is unavailable; fix once using the same leaf Help. For
unknown flag, do not check Help: first prioritize explicit suggestions in the error, then explicit compatible entries in already-loaded Skill/reference; if none, report drift and stop — full Catalog is forbidden. Low-frequency references do not default to Help; root/parent/product Help is forbidden. When discovered, must execute or explain the blocker.unknown command - Do not guess commands/flags/fields/IDs/accounts/business facts; IDs come from real responses. If target has zero hits/multiple candidates/unclear type, disambiguate first; only optional time/display scope uses contract defaults; stop if required information is missing.
- Parse/read/write the same profile, IDs do not cross organizations. For multiple accounts, only use the unique ; otherwise user specifies — selecting first item, most recent login, or most recently used account is forbidden.
isOrgCurrent=true - Do not output/log tokens, refresh tokens, appSecret, or webhook tokens; do not ask for injected authentication.
- Writes must match explicit intent; confirmation is ultimately determined by the Runtime gate/Schema, and is only added after confirmation.
--yes - Verify results after writing; never claim success based on exit code. Exit must include a final response distinguishing completed, partial, blocked, pending confirmation, or failed; preserve existing data and .
complete/hasMore/stopReason/failures - Display timestamps in the session timezone, preserve original values if necessary.
- For authentication/permission/profile/confirmation/unknown errors, only read the corresponding reference; do not consecutively guess alternative commands.
dingtalk-shared
For international, overseas, or regional logins, must be executed (add in headless environments); is only for login, subsequent business commands route automatically based on the selected profile.
.iodws auth login --intl--device--intlProduct or cross-product rules incrementally load on top of the minimal contract. When the user has clear product-content intent, intent takes precedence over URL form; for multi-account selection and cross-organization rules, read . Local files, product boundaries, and cross-product delivery rules are only loaded in corresponding tasks, preventing the global manual from being included in every single-product request.
../dingtalk-misc/references/profile.md渐进加载
Progressive Loading
只读取当前任务需要的文件,不要一次性加载全部 shared references:
| 当前情况 | 必读内容 |
|---|---|
| 已明确单一产品 | 对应 |
| 泛称 DWS、需要选择产品 | routing.md |
| 跨产品、多步骤、汇总或报告 | workflow-routing.md |
输入含用户直接提供的 alidocs | url-patterns.md;先规范化 dlink 再进入目标产品 |
| 输入含其他 alidocs、shanji 等钉钉 URL 且类型不明 | url-patterns.md |
| 产品边界仍然难以判断 | intent-guide.md 的相关章节 |
| 认证、全局 flag 或输出格式问题 | global-reference.md |
| 命令已经返回错误 | error-codes.md;只查错误对应章节 |
| confirmation.md |
命令发现、Schema / | schema-usage.md |
| 怀疑能力不支持 | capability-limits.md |
| 批量/多源采集 | conventions.md |
| 固定短流程 | lite-catalog.md 对应章节 |
产品命令、脚本和字段细节位于对应产品 skill,不在 重复维护。
dingtalk-sharedOnly read the files required for the current task; do not load all shared references at once:
| Current Situation | Required Reading |
|---|---|
| Clear single product | Corresponding |
| Generic DWS, product selection needed | routing.md |
| Cross-product, multi-step, summary, or report | workflow-routing.md |
Input contains user-provided alidocs | url-patterns.md; normalize dlink first, then enter the target product |
| Input contains other alidocs, shanji, or other DingTalk URLs with unknown type | url-patterns.md |
| Product boundaries still hard to judge | Relevant sections of intent-guide.md |
| Authentication, global flags, or output format issues | global-reference.md |
| Command returned error | error-codes.md; only read the error-related section |
| confirmation.md |
Command discovery, Schema / | schema-usage.md |
| Suspected capability not supported | capability-limits.md |
| Batch/multi-source collection | conventions.md |
| Fixed short workflows | lite-catalog.md corresponding section |
Product commands, scripts, and field details reside in corresponding product skills, not duplicated in .
dingtalk-shared本 skill 作为入口时的路由顺序
Routing Order When This Skill Is the Entry Point
- 先识别明确的产品内容意图;明确意图直接选择对应产品。用户直接提供的 alidocs
URL 或来源未验证的 nodeId 仍须读取
/i/nodes/:先执行节点类型 探测,url-patterns.md时将extension=dlink的drive info保存为入口 ID 并传给result.fileId,再按dws doc info逐跳解析目标,把最终目标 ID 交给候选 产品。当前调用链已返回真实类型的稳定 ID 可直接复用。linkSourceInfo.nodeId - 请求包含多个时序步骤、跨产品数据传递或汇总报告:即使 URL 已识别,也要读取
,按行动指南组合需要的产品 skill;当前发布包不包含独立 scenario skill。
workflow-routing.md - 请求是单产品操作但产品不明确:读取 ,再显式读取目标产品
routing.md。SKILL.md - 、
doc/drive/wiki、aitable/sheet等边界仍不清楚: 只读取calendar/minutes的对应章节。intent-guide.md - 仍无法判断时向用户追问,不要猜测产品或命令。
- First identify clear product-content intent; clear intent directly selects the corresponding product. For user-provided alidocs
URL or unverified nodeId, still read
/i/nodes/: first perform node type probing, and whenurl-patterns.md, saveextension=dlinkfromresult.fileIdas the entry ID and pass it todrive info, then resolve the target hop-by-hop viadws doc info, and hand the final target ID to candidate products. Stable IDs already returned with real types in the current call chain can be reused directly.linkSourceInfo.nodeId - Request includes multiple time-ordered steps, cross-product data passing, or summary reports: even if URL is identified, also read
and combine needed product skills according to the action guide; the current release package does not include standalone scenario skills.
workflow-routing.md - Request is single-product but product unclear: read , then explicitly read target product
routing.md.SKILL.md - Boundaries like ,
doc/drive/wiki,aitable/sheetremain unclear: only read the corresponding sections ofcalendar/minutes.intent-guide.md - If still cannot determine, ask the user for clarification; do not guess product or commands.
跨 skill 执行
Cross-Skill Execution
- 正文中的相对 链接是运行时依赖;
Read不会自动加载。metadata.requires.skills - 选择目标产品后,以目标 skill 的命令、参数和风险规则为准。
- 多步骤流程按顺序传递真实返回值;可以并行的只读采集按对应 workflow/reference 执行,写操作默认串行并逐步验证。
- 产品 skill 已内联的清晰操作直接执行;仅在遇到该 skill 未覆盖的参数或边界时读取 更深层 reference。
- Relative links in the body are runtime dependencies;
Readdoes not auto-load them.metadata.requires.skills - After selecting the target product, the target skill's commands, parameters, and risk rules take precedence.
- Multi-step flows pass real return values in order; parallel read-only collection follows the corresponding workflow/reference, writes are serial by default with step-by-step verification.
- Operations already inlined in product skills are executed directly; only read deeper references when encountering parameters or boundaries not covered by that skill.
错误最短路径
Error Shortest Path
- /
unknown command:运行对应层级unknown flag,按公开 flag 修正后最多重试一次;命令选择不确定时读 schema-usage.md。--help - :按 confirmation.md 处理,不要当普通校验错误放弃或静默加
reason=confirmation_required。--yes - 认证或权限错误:读取 与
global-reference.md对应章节。error-codes.md - 其他错误:优先读取 JSON 错误中的 、
retryable、retry_after_seconds、next_retry_at和hint。只有明确actions时才按服务端节奏重试; 缺少重试语义时用retryable=true获取诊断并停止,不连续尝试替代命令。--verbose - 明确不支持的能力:说明边界,不通过其他接口绕过。
- /
unknown command: run corresponding levelunknown flag, fix using public flags, retry at most once; if command selection is uncertain, read schema-usage.md.--help - : handle per confirmation.md; do not treat as ordinary validation error or silently add
reason=confirmation_required.--yes - Authentication or permission errors: read corresponding sections of and
global-reference.md.error-codes.md - Other errors: prioritize ,
retryable,retry_after_seconds,next_retry_at, andhintin the JSON error. Only retry following server pacing whenactionsis explicit; if retry semantics are absent, useretryable=truefor diagnostics and stop — do not keep trying alternative commands.--verbose - Explicitly unsupported capability: state the boundary, do not bypass through other interfaces.