# Changelog All notable changes to this project will be documented in this file. The format is inspired by [Keep a Changelog](https://keepachangelog.com/) and this project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] ## [1.0.66] - 2026-10-28 本版本将已交付的 `v1.0.66-beta.2` 晋级正式版,汇总两个 beta 的改进,并纳入下方列出的 beta 后变更。 ### Changed - 汇总 beta 改进:新增第三方 OIDC 登录、Provider Hook、分步换票及应用与来源隔离的凭证刷新;登录错误保留公开错误码和 Trace ID,并过滤凭证与内部诊断。核心已提供 Hook,真实 SDK 适配由 overlay 接入。 - 汇总 beta 修复:文档创建移除与文档名重复的首个 Markdown H1;安装器在缺失可用 Skill 时明确失败;Gitee 补同步包含 OpenHarmony 归档。 - **Pi 接入说明** — 补齐已有 Pi 适配器的配置、模型选择、会话隔离与重置、工具权限、文本回退及音视频限制说明;按实际参数解释 ask 模式,不引入新运行时行为。 - **数字员工类型迁移** — 本次包含 `open_code → qwenwork` 的破坏性输入变更,脚本及返回值消费者须同步调整;分发前仍需独立核实公共服务的新旧客户端兼容行为,CI 通过不代表服务端已兼容。 ### Changes since `v1.0.66-beta.2` ### Added - **AI Table advanced permission role members** — adds role member append/replace, role copy, and effective user-role query commands with validated member payloads and unified Agent output. - 表单分享更新按 MCP 回读的权限、匿名、查看范围、通知、时间及封面配置校验终态;已回读值矛盾时返回部分失败,旧服务端缺失字段或缺少资源对应证明时继续明确标记未验证。 - 补齐表单分享 get/update 的返回 Schema,并在结果中保留历史成员身份不可用的安全提示。修正表单列表中 UUID 和候选链接的 Help/Skill 说明。 - 对齐 MCP 表单分支的封面可信域名、端口及 URL 格式限制;保留已上传封面的结构化恢复 ID,并兼容非指定成员模式清空授权后的空字符串回读。催填 Help/Schema/Skill 统一使用当前组织 userId,由 MCP 复用身份转换并兼容历史 uid;提示结果不明时不自动重发,兼容不依赖旧客户端升级。 本地封面上传成功后配置更新失败时,整条命令禁止自动重试并清除重试时间建议,保留错误分类、原始诊断和资源恢复 ID,避免重复上传。 回执中的 enabled 与 status 相互矛盾时返回不可自动重放的部分失败,避免将关闭或受处罚的状态误标为已验证成功。 正数提交上限回读为 0(不限制)时按终态不一致处理;仅显式清除上限才接受 0。分享链接读取复用分享配置查询的只读退避重试,读取成功后只生成一次链接和二维码。 - `chat list-all-conversations` 新增显式 `--page-all` 自动翻页,并支持页数、条数和页间等待边界;默认单页行为保持不变。 - 新增 `dws mcp market search`:按名称关键词搜索钉钉 MCP 市场,返回 `mcpId`、名称、描述、服务名、提供方、是否官方和是否收费,可直接衔接 `dws mcp published tools ` 与 `dws mcp url get `。支持 `--limit` 单页数量与 `--cursor` 续页;只覆盖已上架市场的 MCP,企业内发布但未上架市场的 MCP 不在结果中。 - Add independent mind-map creation and topic list/create/update/delete with reviewed OpenNodes input, unified results, and separate routing from blank wiki files and minutes mind maps. - Add group-number join requests and invitation-link group lookup/join with explicit pending results and invitation credential redaction. - Add application scope get/set and preserve failure, pending and unknown outcomes in application lifecycle results; success guidance never executes follow-up actions automatically. - Extend AI Table orchestration with bounded batch reads, build plans, chart templates/layout diagnostics, resumable AI task waits and reports, builtin AI field configuration and field-group operations. Mutations retain explicit verification and recovery facts; unavailable capabilities do not authorize write probes or blind replay. - 为 Schema string 参数的精确枚举迁移增加独立审批清单与 pending/consumed 生命周期;同一个前置 MR 可提交机制与仍保持 before 的 pending 计划,旧基线仍完整比较产品且不读取新清单,新 checker 仅以空审批补查声明。本次登记四项数字员工枚举迁移供维护者审阅,不修改业务参数、不提交 consumed、不调整历史基线或跳过质量门禁。 ### Changed - **Dangerous command confirmation** (#1096) — `calendar event delete`, `calendar attendee delete`, `calendar room delete`, `chat group members remove`, `minutes replace-text`, and `doc permission update` now require explicit confirmation and publish `high` risk in Schema. Event deletion and minutes text replacement also publish `destructive` effects. Non-interactive scripts must pass `--yes` after obtaining user approval; otherwise these commands return `confirmation_required` without calling the remote service. The mono skill's dangerous-operation table now uses the canonical `calendar attendee delete` path for Schema lookup. - `dws dingtalk-tag manage create|list|save-draft --type` 使用 `qwenwork` / `local_agent`;Help、Schema、Skill 和示例同步。 - 创建仍须显式选择类型,响应模式默认值、人设保存、发布前更新人校验及本地 Agent 接入逻辑不变。 - 返回值消费者需要识别 `qwenwork`。在分发新 CLI 前,须独立核实公共服务支持新类型以及旧客户端所需的兼容行为;本说明不代表线上部署已完成。 - 更新不传类型保持原值,类型创建后不可切换。`connect --channel opencode` 是本地适配器名称,不属于本次改名。 - 先核实公共服务兼容性,并同步 MCP 工具类型枚举/描述,再使用新 CLI。旧脚本中的 `--type open_code` 需改为 `--type qwenwork`。 - 回滚 CLI 时需一并核对服务端返回契约;本变更不迁移员工数据。 - `manage set-visibility` 在预览和执行前校验 ALL/PARTIAL、PARTIAL 非空目标及 ALL 与指定目标互斥,非法范围不会调用 MCP;合法请求和旧参数别名兼容保持不变。 - `run run-status` 的 Help 与 Skill 按真实返回说明 `result` 为字符串状态文案,程序应使用 `execStatus` 判断执行状态。 - Skill 上传失败保留公开权限管理链接,不再整段误脱敏;其他 URL、签名地址与凭证仍不输出。Skill 更新仅返回裸 `NO_PERMISSION` 时补充条件式权限引导,保留错误码、Trace ID 和退出码,不覆盖服务端具体说明、不重试写操作。 ### Fixed - **npm Skill installation resilience** (#1320, binary-only switch proposed in #1321) — supports `DWS_NO_SKILLS=1` for binary-only installs and keeps an optional user-cache refresh failure from rolling back an otherwise successful CLI and Agent Skill installation. - **限流错误提示** — 当服务返回 `server_error_code=RATE_LIMIT_ERROR` 时,明确说明当前请求频率过高、本次请求被限流,并引导等待 10 秒后重试;其他错误码保持原有处理。 ## [1.0.66-beta.2] - 2026-10-26 ### Added - OIDC 登录错误诊断:`auth provider-login `、`auth exchange-prepare` 和 `auth token-exchange` 保留 Portal 的公开错误码和 trace ID,并将已定义错误码转换为可读说明。 覆盖配置、事务/state、授权码、身份校验、限流、上游调用和 DWS 会话签发错误。 三个命令均为第三方 IdP 集成入口,不出现在 `dws auth --help` 与 shell 补全中,可显式执行。 - 从 `error.code`、`error.action`、`trace_id` 解析公开诊断;响应体缺失或无效时, 使用合法的 `X-Dws-Trace-Id`。后端日志专用 `reason` 不进入客户端输出。 - 人类可读错误显示 `Trace ID` 和 `Server Code`。JSON 复用现有字段: 传统输出为 `error.server_error_code`,统一输出为 `error.upstream_code`, 两者均提供 `error.trace_id` 和 `error.details.action/http_status/provider`。 - `stop` 提示检查参数/配置或联系管理员;`restart_login` 提示重新登录或重新 `exchange-prepare` 取码。保持单次请求,不自动重试旧 code/state。 - 保留现有错误分类、退出码和 token 响应格式。只保留 Portal 已定义的固定公开 message,不回显任意异常正文、内部 reason 或请求凭证;诊断标识限制长度和字符。 验证包含真实本地 HTTP 错误响应、三条命令的 JSON/人类输出、无效响应的 trace 回退、 配置停止与重新登录提示、取消/超时分类、凭证反射过滤及不重试行为。 - OIDC Provider 通过 `edition.Hooks.OIDCProviders` 注册。核心 Hook 已实现;dws-ant 的真实 SDK 适配和注册留待后续接入。 `auth provider-login ` 从 `edition.Hooks.OIDCProviders` 选择授权实现。 该命令为第三方 IdP 集成入口,不出现在 `dws auth --help` 与 shell 补全中,可显式执行。 必填位置参数 `` 同时传给 transactions 和 exchange 接口。换票请求包含 `provider`、`code`、`state`;显式指定 DWS 应用凭据时再加入 `client_id`、`client_secret`。 核心通过注册项选择授权实现,具体 SDK 由 overlay 提供。 服务地址使用系统统一的 MCP 配置(`mcp_url` 文件或默认地址),登录不修改端点配置。 #### Overlay 接入 公共类型位于 `pkg/edition`,overlay 不需要也不得导入核心的 `internal/auth`。 在已有 `NewHooks()` 中注册名称及授权回调,再沿用启动入口的 `edition.Override(h)`: ```go h.OIDCProviders = func() []edition.OIDCProvider { return []edition.OIDCProvider{ { Name: "ant", Authorize: authorizeWithAntSDK, }, } } ``` `authorizeWithAntSDK` 的函数签名为: ```go func(context.Context, edition.OIDCAuthorizationRequest) (edition.OIDCAuthorizationResult, error) ``` 蚂蚁适配负责调用自己的 SDK,并把 SDK 实际返回的 `code/state` 转为公共结果类型。 若已有 `AuthorizeOIDC` 使用业务侧 DTO,只在这个回调中转换类型;不用复制核心事务、 换票或保存凭证代码。SDK 初始化与认证发生在回调执行时,注册函数只返回声明。 名称可由 overlay 自定义,但必须满足 `[a-z][a-z0-9_-]{0,63}`,并与 Portal 已配置的 provider 一致。重复名称、空回调、非法名称均为注册错误。 #### 执行边界 1. 核心校验 CLI 参数并选择已注册的回调。 2. 核心向 Portal 创建事务,校验服务端 provider、授权参数与有效期。 3. 核心向回调传入 `authorization_endpoint`、独立的参数 map 及受事务期限约束的 context。 4. SDK 尊重取消与超时,原样使用服务端授权参数并返回实际取得的 `code/state`。 5. 核心验证授权码及原事务 state,再换票、补全身份、保存 DWS profile。 SDK 会话、密码、DWS 换票用的 client secret 和 PKCE verifier 不属于这个回调的输入输出。 错误中不得包含认证材料;核心也不记录 SDK 原始错误文本。授权失败、取消、超时或 state 不匹配不会触发其他 SDK 或 Mock 兜底,也不会换票或保存凭证。 没有注册对应实现时,核心仍先检查 Portal 配置;服务端接受 provider 后返回 `OIDC_SDK_UNAVAILABLE`。Help 和 dry-run 不枚举注册项、不初始化 SDK、不访问网络。 普通 OAuth/PAT 登录和分步 `exchange-prepare` / `token-exchange` 入口保持独立。 #### 联调与依赖更新 核心的 Hook API 提交并推送后,overlay 需要把远程核心依赖更新到包含该 API 的提交, 再编译上述注册代码。只修改另一 Go 包里的同名文件不会替换核心实现。 回归验证覆盖自定义名称和 ant 注册、真实命令入口及凭证保存、非法/重复/缺失注册、 后端拒绝、SDK 错误脱敏、取消/超时、state 篡改、空授权码和 help/dry-run 无副作用。 ```bash DWS_PACKAGE_VERSION=0.0.0-test CGO_ENABLED=0 go test ./pkg/edition ./internal/auth ./internal/app ``` 已验证:上述三个包的完整测试、Hook 定向 race 测试、`go vet ./...`、`make build`, 以及构建后二进制的 provider-login help / dry-run。未执行真实蚂蚁网关登录。 - 支持业务分步完成第三方登录:先执行 `dws auth exchange-prepare --provider ant` 获取服务端授权参数,再由业务调用 IdP/SDK 取码,最后执行 `dws auth token-exchange --provider ant --code --state ` 换取 DWS Token。 支持 `--code-stdin`、可选且必须成对的 `--client-id/--client-secret`,默认返回现有 TokenData;显式 `--save` 后在线核验完整身份并保存,保留已有默认账号。两个命令均支持 `--dry-run`,服务地址使用系统统一的 MCP 配置(`mcp_url` 文件或默认地址),不修改全局配置;保存 Token 时记录其刷新所用的 Portal 地址。PKCE verifier 始终由服务端保存,换票失败不会自动重试一次性 code/state。 命令沿用统一结果输出。作为第三方 IdP 集成入口,两个命令以 Cobra Hidden 隐藏,不出现在 `dws auth --help` 与 shell 补全中,仍可显式执行;不进入 Agent Schema(Hidden 且无 Contract.Identity),也不再占用 reviewed Schema 排除列表。 macOS 终端按实际文件描述符识别,使用 `select` 等待输入,不依赖 `/dev/tty` 或 `/dev/stdin` 文件名,覆盖 `< /dev/tty` 重定向;以 50ms 周期检查取消,不改变终端模式、不关闭借用句柄。高编号输入使用低编号描述符副本等待,完成后只关闭副本;低编号描述符耗尽时明确报错。 `--code-stdin` 的等待输入和后续换票共享一分钟超时,并响应调用方的取消或更短截止时间。取消、超时错误保留原有身份,不归类为参数错误,也不会继续换票。Unix 标准输入使用可取消的轮询读取,取消后保留原文件描述符;Windows 控制台保留原输入模式,通过原生 API 取消读取,重定向管道则通过关闭来中断。宿主通过 `SetIn` 注入的自定义阻塞输入须支持 `Close` 中断读取(取消时会关闭,正常完成时保留)。无 `Close` 的自定义 Reader 须为非阻塞或自行响应 context。 OIDC 换票响应增加实际 DWS `clientId`(与 IdP 的 `client_id` 不同)。`provider-login` 和 `token-exchange --save` 均保存该应用绑定和原 Portal 地址。默认应用继续由 Portal 托管密钥;显式指定的自定义应用将原始密钥保存到现有安全凭证槽,并与 Token/Profile 写入一起回滚。刷新自定义应用时从该槽读取密钥,发送给原 Portal 的 `/oauth2/refreshToken`,不回退到全局应用、不跟随重定向、不在结果或 app.json 中暴露密钥。未使用 `--save` 的分步换票不写入本地凭证。 需要同步部署 Portal:默认 OIDC 响应返回实际 `clientId`,刷新接口接受可选 `clientSecret`。旧版默认响应缺少应用绑定时,新 CLI 会明确要求更新 Portal;旧的缺失绑定记录需要重新登录。 OIDC 登录持久化时记录 `oidc_provider`,刷新成功继续保留;该本地元数据不加入未保存的 token-exchange 返回值。所有 OIDC 分支只通过该字段识别,不再从 Portal 地址或密钥模式推断登录来源。此前未记录该字段的开发测试凭证不做兼容迁移,需重新登录。 OIDC 刷新前校验原应用、Portal 和登录来源绑定,缺失时直接报错,不使用全局应用或默认端点兜底。刷新失败不读取组织镜像或历史全局凭证,即使同用户、同组织也不能切换应用。被拒绝或失效时提示重新执行 provider-login 或原分步登录流程,自定义应用需沿用原 client-id/client-secret;网络、取消、超时、限流和 5xx 保留原凭证,不强制重新登录。普通 OAuth 既有恢复策略保持不变。 已确认的 `invalidParameter.authCode.notFound` 仍保留脱敏后的错误类型和规范化业务码供分类使用;错误识别不再意味着允许 OIDC 凭证恢复。服务端原始错误文本不进入输出、日志或错误链。 ### Fixed - **Installer skill failures** (#779) — fail explicitly without an installation-success banner when a release archive has no usable skills and no local source is available; also fail when the PowerShell local mono skill directory is missing. - 修复 Gitee 补同步入口遗漏 OpenHarmony 附件的问题,使已发布稳定版本的完整九项制品能够通过附件清单校验。 ## [1.0.66-beta.1] - 2026-10-21 ### Fixed - **Document creation title deduplication** — `dws doc +create` removes a leading Markdown H1 that matches the document name, including names inferred from Markdown, before chunking and readback verification. Different headings, indented code blocks, and JSONML content remain unchanged; inline document content preserves its surrounding whitespace. ## [1.0.65] - 2026-10-20 This release promotes the sealed `v1.0.65-beta.2` contents to stable. ### Changed - 汇总两个 beta 版本的改进:支持聊天消息内发送本地图片、跨 MCP 委托身份传递,以及数字员工的 A2UI 回复、群聊权限、引用与图片上下文和送达状态反馈。 ### Changes since `v1.0.65-beta.2` ### Added - 数字员工新增 A2UI 回复模式:支持的本地接入先发送占位卡,再将公开进度和最终答案更新到同一卡片。新连接默认使用 A2UI,已有未配置回复模式的连接保持文本回复。 - A2UI 创建和更新命令支持通过 `--content -` 从标准输入读取消息数组,避免长正文占用命令行参数。 - **审批图片上传** — 新增 `oa approval image upload`,校验本地图片并自动压缩超出 2MB 的图片,返回 `mediaIdV2` 供审批图片控件使用;同步修正联系人控件取值格式与部门 ID 核验指引。 - **群公告选项** — 创建和编辑公告支持 `--no-card` 静默发布及 `--must-read` 新人必看;显式传入 `false` 可关闭对应选项。 - **联系人身份查询** — 新增 `contact user get-open-dingtalk-id`(别名 `get-open-id`),按手机号或钉钉号查询 `openDingTalkId`,提供统一结果与 Schema;服务端灰度与频次限制仍适用。 - **登录审批来源** — CLI 授权状态、超级管理员查询及授权申请请求在识别到 Agent 宿主时携带来源标识。 ### Changed - **AI 表格访问密钥** — 标准命令调整为 `dws aitable supabase api-key create/list/revoke`。原 `dws aitable api-key` 三个命令继续兼容,参数、返回结果和权限要求保持不变。 ### Fixed - **Skill setup staging fail-closed** (#1421) — path walks no longer skip read-only sibling directories behind a link entry, and staging identity read failures no longer delete by name or silently degrade to compat install, preventing leftover staging objects and false success reports during `dws skill setup`. - **Windows Agent skill link readability** (#1425) — uses directory junctions with absolute canonical targets for Agent skill adapters on Windows, upgrades legacy directory symlinks, and validates readability before publication, preventing `EPERM` errors when followed by Node.js and Agent skill loaders. - **升级版本比较** (#556) — `dws upgrade`、`dws upgrade --check` 和 `dws doctor` 比较版本时按 SemVer 忽略 build metadata(`+...`)。此前当前或远端版本号带 `+` 时,可能把更旧或相同的版本误报为可升级,或漏报真正的新版本。 - Prevent publishing a digital employee draft when its available last-editor identity differs from the current operator, while preserving compatibility for legacy drafts without that identity. - Describe digital employee create and publish workflows as composite Schema interfaces, and publish the exact-one constraint for Skill updates using `--enabled` or `--file`. ## [1.0.65-beta.2] - 2026-10-15 ### Changed - **数字员工回复复用 chat** — 通用发送与引用回复增加 stdin 正文、投递回执和绑定上下文校验;本地数字员工 worker 使用通用 chat 回传,保留已发布的 `channel reply` / `channel operator-private` 兼容入口,新宿主改用通用 chat,配套 DSH 要求 `chatDelivery=true`,缺失时提示升级;双方须配套升级。 - **A2UI 审批卡片兼容** — 发卡命令支持 `--summary` 自定义聊天预览,满足 DSH 数字员工的卡片能力探测;省略时继续使用原有默认摘要。 local_agent 私聊权限读取 DEAP 已发布可见范围(成员及部门子树);群聊以已入群为准,不叠加个人可见范围或本地群白名单,并修复空白名单漏订阅群内 @ 消息;群聊仅原生 @ 当前员工才触发,普通消息不进入模型。DSH 按 groupMembershipAccess 能力传递群上下文;其他场景保留本地白名单。DWS/DSH 共用绑定查询判定,固定管理 Profile,查询失败不回退放行。 ### Fixed - **数字员工本地 Agent 状态反馈** (#1475) — 在原消息上显示排队、思考、已完成、失败或待核查状态;执行失败时发送明确提示,正常结束但无回复文字时仅贴“收到”,并将表情更新与正文投递分开记录,避免提前显示完成或因表情失败重复执行。 - **数字员工引用上下文** (#1475) — 本地 Agent 接收引用回复时同时获得被引用的消息内容,避免只能看到当前问题;保留普通输入、会话指令及原有授权范围。 - **数字员工 Codex 本地任务** (#1475) — 修复内置 Codex 误用群聊机器人的附件问答限制,允许按用户请求和现有权限使用本地技能与 CLI,保留沙箱配置,并避免会话恢复失败后静默新建、丢失上下文。 - **数字员工图片输入** (#1475) — 自动下载直发或引用图片并交给本地 Agent,Codex 使用原生图片输入,避免只有 mediaId 无法识别;下载失败明确提示并保留失败状态。 - **数字员工回执查询** — 等待发送回执时,对 `im/query_message_send_status` 返回的结构化错误码 `1001` 重查原发送任务,兼容回执尚未落库的短暂窗口;查询和等待共享最多 2 秒预算,到期报告送达状态未知,不重新发送消息。 - **数字员工自身消息识别** — connect 使用员工自己的登录身份精确解析自身开放 ID,避免发布详情与入站事件的身份作用域不同而产生自回复。旧配置没有员工 Profile 作用域标记时,原生 worker 和 DSH 启动阶段只解析自身一次;失败拒绝启动,不依赖主管、不逐消息查询、不修改原绑定、模型、权限或会话。 - **数字员工平台入站权限** — 正式绑定的 local_agent 直接使用平台保证的私聊投递和群内 @ 权限,不再逐消息查询可见范围、通讯录或部门;其他本地通道保持白名单。旧绑定缺少主管 Profile 也可正常启动,删除仅用于可见范围的主管迁移和启动阻断。新绑定不再写入该历史字段,固定 operator 审批、绑定版本与解绑检查保留。DSH 通过 bindingAccessPolicy 能力读取明确访问策略,需配套新版插件。 - **Windows 图片与卡片契约** — Markdown 本地图片识别盘符路径及标准 file URI;内嵌 A2UI 解释资源在检出时保持 LF,避免摘要因换行转换失配。修正数字员工工作目录、附件及导出路径的跨平台测试夹具。 - **升级下载** — 官方开源版独立安装继续通过 npm 查询版本,改为只下载同版本 GitHub Release 的当前平台归档和技能包,避免下载包含其他平台的完整 npm 包。官方 Release 查询优先使用环境变量或本机 GitHub CLI 已有凭据,无可用凭据时匿名查询;凭据不进入 Registry 或资产下载。强制验证资产大小、SHA256 和二进制版本;失败时不自动回退全包。`--dry-run` 展示预计下载量,`--skip-skills` 省去技能包下载。自定义源和包管理器升级保持原有行为。 ## [1.0.65-beta.1] - 2026-10-15 ### Added - **本地图文混排** — `chat message send --content` 和 `chat +messages-send --as user --markdown` 自动上传行内本地图片,保留前后文字;支持预览、内容去重及最多三路并发上传。 - **图文图片上传** — 使用上传返回的 `mediaIdV2` 构建图文消息;缺少 V2 时终止发送,避免使用不符合图片下载接口契约的编号。个人收藏表情保留原有媒体编号选择行为。 - **图文图片编号复用** — 发送时识别裸 V2 图片编号;读取 Markdown 和富文本图片后生成带消息、会话身份的下载参数。 - **图文图片错误提示** — 使用固定诊断区分文件读取、路径校验和上传失败,保留敏感路径保护,并提供对应的处理建议。 - 新增全局隐藏参数 `--delegator-user-id`、`--delegator-corp-id` 和 `--delegator-open-dingtalk-id`。根命令在本次执行作用域持有校验后的不可变身份快照,公共 runner 统一向四个内置 HTTPS MCP 网关透传;旧 helper 丢弃 context 时也能补入身份,无需按业务逐条改造。无效输入整组省略;旧文档委托入口保持兼容,新旧协议禁止混用。实际委托授权依赖网关和业务服务接入。 - 修复 AI 表格主服务、辅助服务、分页、重试、视图更新和工作流发布的上下文传递,保留取消信号;扩展真实命令到 HTTP Header 的回归矩阵,并覆盖串行 root 复用和多个预建 root 的身份隔离。同进程多 root 并发执行不在支持范围,并发调用使用独立 CLI 进程。 - 更新 DWS 业务接入指南:说明公共 runner 覆盖条件、真实命令测试和绕行通道的接入要求;插件、stdio、发现、scoped 换票、独立 published MCP、直接 OpenAPI、文件字节传输及事件长连接继续排除,跨源重定向清理和 UID 发送边界保持不变。 ### Fixed - **媒体下载提示** — `dws chat message download-media` 的 Help 说明返回的下载地址临时有效,提示使用原 mediaId 及消息、会话信息重新下载。 ## [1.0.64] - 2026-10-14 本版本将已交付的 `v1.0.64-beta.1` 晋级正式版,汇总该 beta 的变化,并纳入下方列出的 beta 后变更。 ### Added - **Pi Coding Agent 接入** — 新增 `--channel pi`,支持官方 JSON 流式文本、模型覆盖、按会话隔离和重启续聊;ask 模式禁用工具。 - **通讯录好友与事件** — 增加好友列表、申请列表、发送和处理申请、删除好友,以及好友申请和添加事件;统一使用 `openDingTalkId`,提供到 `userId` 的查询入口,补齐昵称、备注、状态和 Agent 使用说明。写操作要求明确确认,删除好友属于高风险操作。 - **OpenHarmony 发布包** — 增加静态自签名的 `openharmony/arm64` 归档和 SHA256,集成 SafeChat 消息加密;npm 与 Homebrew 的平台范围保持原有配置。 - **版本检查与升级提示** — `auth status`、`version` 和 `--version` 提供限时、可缓存、可关闭的更新检查;未知输入优先给出具体纠错建议,仅在缺少明确建议时检查新版,保留原错误类别、退出码和机器输出。 ### Changed - **AI 表格契约与公开同步** — 精确登记 24 项幂等性声明纠正,并限定已审查的公开同步补丁;未登记接口及风险、确认要求和执行效果的兼容保护继续生效。 ### Fixed - **AI 表格写入、等待与筛选** — 保留原始 clientToken,未知写入停止重放并通过只读对账恢复;补齐批次分组与旧回执兼容。建表、建字段提供有时限的结构核对,超时或取消不重复创建;统一查询、批量更新的筛选校验及 Help、Schema、Skill 说明。 - **日历、白板与 AI 卡片** — 修复日历嵌套时区与忙闲字段的写后核验,读回失败时保留写入回执;白板在预览或远端调用前校验 OpenNodes 层级与文本样式。更新 AI 卡片协议索引、兼容预检、预览及业务标识处理,补齐白板和卡片使用说明。 - **升级来源与安装方式** — 开源版默认通过 npm Registry 查询版本;包管理器安装交由对应工具升级,独立二进制校验 npm 包完整性与资产 SHA256 后自更新,无需 npm 或 Node.js。保留备份、回滚和 Skill 更新,修复 npm 强制升级、同版本重装及安装文档中的环境变量传递。 ### Changes since `v1.0.64-beta.1` ### Removed - **Chat Thread** — 下线 `chat thread promote`,历史调用返回 `command_retired`,帮助与 Skill 不再推荐该命令。已有消息转为话题暂无等价替代;新建话题使用 `chat thread send`,回复已有话题使用 `chat thread reply`。 - **招聘产品下线** — 开源版移除 `dws recruit job list`、`get`、`create` 及整个招聘产品域的内置注册、Schema、MCP 端点和 Skill 入口。招聘能力仅在千问办公专属版维护。 ### Fixed - **wget-only install of the latest release** (#1456) — resolving `latest` without curl now requests the GitHub releases URL directly, so wget can read the release tag instead of failing before the download. - 修正 npm 包的问题反馈、仓库和主页链接,统一指向 `DingTalk-Real-AI/dingtalk-workspace-cli`,避免 `npm bugs` 打开 404 页面。 - **招聘退役兼容检查** — 精确登记已批准的开源招聘产品退役,避免仍含招聘能力的旧稳定版阻塞后续 PR 和发布兼容检查;其他产品和接口的兼容保护保持生效。 ## [1.0.64-beta.1] - 2026-10-09 ### Added - **Pi Coding Agent 原生接入** (#1472) — 新增 `--channel pi`,支持官方 JSON 流式文本、模型覆盖、按会话隔离和重启续聊;提供本地官方 CLI 验收,ask 模式禁用工具。 - **Contact friend CLI** — adds `dws contact +friend-list`, `+friend-request-list`, `+friend-request-send`, `+friend-request-accept`, `+friend-request-reject`, and `+friend-remove` shortcuts for the friend-link MCP tools published under `mcpId=2400`. All friend shortcuts accept and return `openDingTalkId` (the open-platform pairwise identifier used in friend event payloads) instead of `dingtalkId`; the write shortcuts require explicit user confirmation (`user_required`), and `+friend-remove` is a high-risk write that must be confirmed before `--yes` is accepted. - **Contact user lookup by openDingTalkId** — adds `dws contact user get-by-open-dingtalk-id --id ` (alias `get-user-by-open-dingtalk-id`) to retrieve a user's `userId` from their openDingTalkId, closing the friend-event-to-userId resolution loop. - **Friend list projections expose the nickname** — `+friend-list` projects `userProfileModel.nick` (friend nickname) alongside the reviewed `alias` (friend remark name) and the friend-operation `status` (1=added, 0=removed); `+friend-request-list` projects the requester `nick` and documents the status enum for agent translation. Both list schemas mark `openDingTalkId` as the internal identifier required for follow-up operations: always returned, displayed only when the user needs to act on it. - **Personal friend events** — registers two personal event keys for subscription and flattened projection: `user_contact_friend_request_received` (src/dest openDingTalkId, remark, source, apply time) and `user_contact_friend_added` (friend openDingTalkId, friend name, establish time, direction active/passive). Payloads without the required identity fields, or with an unknown direction, fail closed instead of projecting an empty result. - **Friend shortcuts join the public catalog** — registers the six friend shortcuts in `semantic_catalog_contact.json` (reviewed, public) and regenerates `docs/shortcut-public-catalog.json` plus `internal/shortcut/public_catalog_generated.go`, so they are visible to agents instead of hidden. - **Contact skill documents the friend surface** — `skills/multi/dingtalk-contact/SKILL.md` gains a friend SOP, intent-table rows, and VISIBLE_SHORTCUTS entries; `references/contact.md` gains the friend command reference (risk levels, openDingTalkId identity-key rules, pagination semantics, `+friend-remove` confirmation policy) and the `get-by-open-dingtalk-id` command section, so AI agents can discover and route friend intents. - **OpenHarmony build, self-signer, and release** — builds a static self-signed `openharmony/arm64` package (pure-Go signer `cmd/binary-sign-tool`, deterministic archive) and publishes `dws-openharmony-arm64.tar.gz` with its SHA-256 in every beta and stable GitHub Release, verified on a HarmonyOS PC, with SafeChat message crypto linked through the pinned OpenHarmony NDK (static cgo build, OpenSSL notice in NOTICE), while keeping runtime payloads, npm, and Homebrew unchanged. - **版本检查** — `auth status`、`version` 和 `--version` 显示当前版本与更新检查结果,支持限时查询、缓存、只读模式和关闭检查;开源版默认通过 npm Registry 查询,减少对 GitHub API 限额的依赖,无需安装 npm。 - **未知命令升级提示** — 已有具体拼写候选、人工路径或参数纠正、已知处理方案时保留原 hint,不发起版本网络检查。没有明确建议、只有通用帮助指引的未知输入才限时检查新版,并在有更新时附加升级建议,保留错误类别、退出码和机器输出格式;不据此判定该命令一定存在于新版。 ### Changed - **AI 表格契约迁移** — 精确登记 24 项幂等性声明纠正,继续拒绝未登记路径以及夹带风险、确认要求或执行效果变化。 - **公开同步准入** — 为已审查的 AI 表格同步 PR 登记固定来源和完整文件补丁,仅允许该批准内容;其他 AI PR 的文件数量和保护目录规则保持原样。 ### Fixed - **AI 表格写入与对账** — 保留调用方的原始 clientToken,写入结果未知时停止自动重放,并通过只读对账恢复;补齐批次分组与旧回执兼容。 - **AI 表格创建后等待** — 建表、建字段支持有时限的只读结构核对;等待超时或取消不会再次创建对象。 - **AI 表格筛选与发现** — 查询和批量更新共用筛选校验,统一 Help、Schema 与 mono/multi Skill 的参数和安全说明。 - **安装文档** — 修正 mono 模式和 Gitee 镜像安装示例中的环境变量传递。 - **日历写后核验** — 按真实嵌套字段校验时区与忙闲状态;读回失败时保留成功写回执并阻止自动重放。 - **白板内容校验** — 在预览、生成 SVG 或远端调用前校验 OpenNodes 字段层级和文本样式,并补齐独立白板与文档内嵌白板的路由说明。 - **AI 卡片协议与预览** — 更新 explain 索引与兼容性预检,保持更新状态并使用服务端返回的业务标识;同步组件、模式和示例说明。 - **升级来源** — 开源版的 `upgrade --check`、`--list` 和指定版本查询默认使用 npm Registry,避免依赖 GitHub REST API 的匿名请求额度;保留显式配置的 GitHub 镜像和仓库。 - **升级方式** — npm、pnpm、Homebrew 安装交由对应包管理器升级;独立二进制直接下载 npm 发布包,校验包完整性和平台资产 SHA256 后自更新,无需 npm 或 Node.js。保留原生安装的备份、回滚与技能包更新。 - **强制升级** — npm 全局和局部安装均转发 `--force`;同版本重装保留 `npm rebuild`,重跑安装脚本恢复包内二进制。 ## [1.0.63] - 2026-10-03 本版本将已交付的 `v1.0.63-beta.3` 晋级正式版,汇总本版本线三个 beta 的变化,并纳入下方列出的 beta 后变更。 ### Added - **数字员工** — 新增管理、能力资源、运行追踪、员工身份登录与本地 Agent/DSH 接入;支持草稿、发布、Skill ZIP 上传与员工域 MCP 配置,使用 `agentUuid` / `userId` 身份契约。草稿配置与发布分别执行,事件连接状态区分 IPC、Agent 初始化和实际传输就绪。 - **通讯录与邮箱查人** — 支持通过 dingtalkId 查询 userId,通过企业邮箱单个或批量查询员工;批量查询分别保留已成功、未找到、失败与未知结果,避免把未确认结果报告为未找到。 - **考勤审批与鉴权快照** — 增加审批时长计算、出差/外出配套日程校验及复杂加班设置查询;`auth status --readonly` 提供不联网、不刷新、不写凭据的本地状态快照。 - **等待能力** — 框架增加声明式轮询、事件与自动回退等待;声明支持的命令提供 `--wait` / `--wait-timeout`,超时保留 `pending` 与最后观察状态,事件与轮询共用截止时间。 - **白板与 AI 表格恢复** — 增加白板 SVG 预览、差异确认、个人/团队及模板中心模板;AI 表格提供只读写入结果查询及保留原 clientToken 的不确定写入恢复路径。 ### Changed - **Schema 与启动性能** — 每次执行保持完整 Cobra 命令树,减少元数据和初始化分配;支持平台在安装或首次使用时从本机声明生成身份及经过认证的持久缓存。缓存缺失或损坏时修复,运行时插件场景由隔离子进程完成缓存构建与修复。 - **消息读取与国际登录** — 智能消息读取在策略允许时解密第三方加密消息,保留逐项解密台账;MCP 与输出投影保留大整数精度。国际登录默认使用英文,国内登录沿用现有语言设置。 - **数字员工参数与文档** — 主程序类型统一使用 `--type`,可见范围使用 `--user-ids`,保留历史参数兼容;支持可选创建提示词、发布本地员工前按需初始化提示词,以及草稿文本的空值校验。更新 OA TableField 二维数组示例、Devapp/Devdoc 流程及文档列表路由。 - **参数错误** — 框架统一参数校验的错误分类与退出码,保留业务错误及取消/超时的原有语义。 - **AI 搜问证据** — 丰富搜索结果的证据与解析详情,使用说明要求先核对证据再给出结论或交接后续操作。 ### Fixed - **跨平台发布** — 修复 Windows SafeChat CGO 运行库崩溃,以及 Darwin amd64 产物被 dyld 拒绝启动的问题;Darwin 构建固定 macOS 11.0 最低目标,签名资产验收检查 `SG_READ_ONLY` 并实际启动可执行的 Darwin 产物。 - **AI 表格回执与分页** — 表单分享按返回身份、显式请求字段和 CP 同步状态验证结果;未完整确认时保留部分失败证据。未知写入不重放创建;失效游标丢弃旧快照结果,复合流程停止后续写入。配套恢复接口仍依赖对应 MCP 服务与网关部署。 - **登录恢复** — 缺失 DEK 或旧密文不匹配时允许重新登录,取得新凭据后才替换目标;登录中的临时身份查询立即使用本次 MCP 端点覆盖,保留刷新及暂时 Keychain 故障的保护。 - **消息与事件** — 修复单聊引用回复的误拒绝,保留 OA 审批事件业务字段;个人 Stream 正确响应系统控制帧,数字员工连接沿用事件来源默认规则,改进重连及 Windows 正常停止判断。 - **文件与凭据边界** — 数字员工 Skill ZIP 使用同一已打开句柄完成校验与上传,防止路径替换;补充失败清理、绑定回执和日志脱敏验证。 ### Removed - **旧合同审查入口** — 隐藏历史 `contract review benefit|create|analysis|result` 命令并标记不可用;保留历史参数入口,但以 `command_retired` 拒绝执行,不再调用旧 MCP。 ### Changes since `v1.0.63-beta.3` ### Added - Add `dws aicard explain `, `lint`, and `preview`. The embedded DingTalk A2UI protocol supports native offline lookup and structural validation without Python. Preview validates a complete new-card file and sends it to the current user's direct chat; dry-run does not send. Include the DWS authoring Skill and report request acceptance separately from client-rendering evidence. - **Drive & Wiki set-share-scope** — add `dws drive permission set-share-scope` and `dws wiki permission set-share-scope` for managing node-level and workspace-level share visibility (PRIVATE / ORGANIZATION / PUBLIC) with partial-update semantics, role control, partner inclusion, organization search/recommend toggles, password protection and expiration (drive node only). - **OA 审批模板创建与更新命令** — 新增 `dws oa approval template create`(`oa/create_process_template`)与 `dws oa approval template update`(`oa/update_process_template`),均为企业钉钉管理员能力。两者支持逐项参数模式(`create` 必填 `--name`、`--schema-content`;`update` 必填 `--process-code`、`--name`、`--schema-content`、`--process-config`),也支持 `--from-document` 传入完整 JSON 文档的绝对路径整体配置,两种模式互斥;`--schema-content`、`--process-config` 等对象参数以 JSON 字符串发送给 MCP,`--plugin-configs`、`--visible-range`、`--manager-user-ids` 以数组发送,均支持直接 JSON、`@文件` 与 `-` 标准输入。CLI 侧做本地校验:`schemaContent` 控件 `props.id` 唯一性检查(递归进 `children` 嵌套控件)与 `processConfig` 结构校验,并解析 MCP 返回的 `810001`(同名模板冲突)/`810002`(模板数量超限)拒绝码为失败输出而非静默重试;`--dry-run` 仅做本地校验并展示请求参数(`executed=false`),成功统一由 `data.processCode` 返回模板编码。构造 `processConfig` 时若未显式指定审批人类型,审批节点默认使用**部门主管**(`target_management`)而非直属主管。**Skill 文档**:新增 `oa-template-write.md`(从 `oa.md` 拆分模板写入路由,渐进披露)与连接器审批人规则 `target_connect_approval.md`,并补充 50+ 个控件 schema、流程节点、选人规则子文档;`oa.md` 增加模板管理路由条目、`process-nodes.md` 增加连接器审批人条目、`SKILL.md` 引用 `oa-template-write.md`。**验证状态**:变更代码含完整单测(含 `schema_oa_template_contract_test.go` Schema 契约测试)与 `mono-multi-coverage.yaml` 的 `oa-template-write` 注册;模板名称是否可用、数量是否超限由创建 MCP 校验,dry-run 不能证明名称可用,建议创建/更新后再用 `template detail` 核对实际状态。 - **AI 表格访问密钥** — 新增 SQL Sheet API Key 的创建、查询和撤销命令,以及对应的 Agent 使用说明;完整凭据仅创建时返回,创建结果未知时先查询状态。 ### Changed - Git hooks 改为通过 `make setup-hooks` 显式启用,提交前仅检查暂存区格式与空白,不修改工作区。 - 发布辅助脚本在退出时可靠清理临时目录和锁,并为下载增加有界重试、超时和阶段诊断。 ### Fixed - 固定 AI 卡片协议 JSON 的 Git 检出换行为 LF,修复 Windows 自动转换 CRLF 后协议哈希校验失败、卡片查询和校验命令无法使用的问题。 - 修复 Windows 鉴权文件替换遇到短暂文件占用时的失败,保留旧文件并对受限错误执行有界重试。 - 修复 Linux Skill 安装期间的目录身份校验,固定目录句柄并在结束后释放。 - 修复产品命令根名称与产品 ID 不一致时的 Schema 缓存定位。 - AI 听记整包导出支持服务端明确成功的空摘要,仍保留分析等待器的严格判断。 - 钉钉招聘创建职位时正确处理校园招聘默认值,并保留 Connector 返回的业务错误信息。 ### Security - **Password argv sanitization** — add `--password` to the timing/perf report sensitive-flag allowlist so `SanitizeCommand` redacts it in both `--password ` and `--password=` forms. This also fixes a pre-existing plaintext leak where `dws drive publish set --password …` wrote the raw secret into the `DWS_PERF_REPORT` argv record. The `drive permission set-share-scope --dry-run` preview now masks the password value as `***` while still emitting `requirePassword`; real calls keep sending the correct secret and no business RPC is issued during preview. ## [1.0.63-beta.3] - 2026-09-23 ### Fixed - **darwin/amd64 release asset fails to launch** (#1441) — the CGO cross-link defaulted the x86_64 deployment target to macOS 10.13, so ld64 emitted `__DATA_CONST` without `SG_READ_ONLY` and current dyld aborts the binary before `main()`. Release builds now pin `MACOSX_DEPLOYMENT_TARGET=11.0` (matching the arm64 floor), and the signed-artifact verification statically checks the `SG_READ_ONLY` flag and launches every Darwin asset it can execute before publication. ## [1.0.63-beta.2] - 2026-09-22 ### Changed - Standardize `dingtalk-tag manage create/list/save-draft` on `--type` and `set-visibility` on `--user-ids`, keeping help and Skill guidance focused on canonical flags while preserving existing script compatibility and MCP field mappings. - Document `set-visibility` in both mono and multi Skill references, including ALL/PARTIAL scopes, full replacement semantics, omitted-list clearing, the userId-to-staffIds mapping, and confirmation requirements. - Send only supported fields in publish requests and keep compatibility handling silent in both preview and execution. ### Fixed - Accept optional `--prompt` when creating digital employees. Save custom prompts in the new draft, default omitted prompts only for `local_agent`, and remind other supported types to configure a prompt before publishing without blocking draft creation. - Include prompt initialization in dry-run previews and retain the created employee ID with recovery guidance if subsequent draft initialization fails. - Initialize a missing platform prompt before publishing a local_agent employee, preserving existing prompts and stopping publication when draft lookup or initialization fails. Dry-run retains its request preview contract and includes the conditional steps without remote calls. - Reject explicitly empty or whitespace-only save-draft text fields in both preview and execution, while preserving omitted fields. Clarify the coordinated server contracts for no-op draft saves and draft/published snapshot responses. ## [1.0.63-beta.1] - 2026-09-22 ### Added - **Attendance approval helpers** — adds shortcuts to calculate attendance approval duration, validate travel/out-of-office companion schedules, and query employees' effective complex overtime settings. Proposed overtime durations (total and per-day detail entries) must be finite positive numbers matched to the requested duration unit, and numeric detail-list work dates must be 13-digit millisecond timestamps; anything else is rejected before the server call. Flag help publishes each custom constraint's decision facts so the delivered schema keeps the validation contract visible to agents, and the detail-list help matches the two-stage workflow (second-stage input; the first stage omits it to obtain the server's per-day skeleton). - **Auth status read-only snapshot** — `dws auth status --readonly` observes the local credential snapshot without the authentication lock, network validation, refresh, migration, or credential writes, keeping the same output fields as normal status and reporting inconclusive local state through explicit `reason` codes instead of a confirmed logout. - **Contact user lookup by dingtalkId** — adds `dws contact user get-by-dingtalk-id --id ` (alias `search-dingtalk`) to retrieve a user's `userId` from their dingtalkId. - **数字员工管理与能力资源** — 新增 `dws dingtalk-tag manage`、`capability`、`run`,覆盖创建、草稿保存、发布、查询、Skill ZIP 上传、员工域 MCP 创建与运行追踪;统一 `agentUuid`,支持双响应模式与 `open_code` / `local_agent` 类型。MCP 创建自动追加草稿依赖配套服务端,不自动发布;Skill/MCP 选择支持省略保留、空数组清空和非空数组替换。 - **员工身份登录** — `manage login` 串联授权码申请、换票、在线身份核验和精确 Profile 保存/刷新,保持主管当前 Profile;补充外部 `auth exchange`,不在普通输出中返回授权码或 Token。 - **本地 Agent 接入** — `dingtalk-tag connect` 支持本地 Agent Adapter 与 DSH,提供员工隔离的事件处理、生命周期、设备绑定及失败恢复;仅登录员工身份使用 `manage login`。同步 Help、Schema、mono/multi Skill 与必要接口文档。 - 统一 `dingtalk-tag manage` 的 `agentUuid` / `userId` 用户契约:创建时部门可省略,草稿按字段更新并分开 Skill/MCP 输入,本地头像可安全上传且不暴露临时凭证。 - 直属上级的输入与输出统一使用 `supervisorUserId`;HSF 历史字段名仅保留在 MCP 映射边界内部。 - 头像统一使用 `avatarUrl`;`--avatar-url` 同时支持公网 HTTP(S) 与本地图片,本地文件复用 Skill 上传封装并自动回写。 - 创建、更新的主程序类型映射到 MCP `digitalTagEmployeeProfile.type`;列表筛选仍使用顶层 `type`。CLI 保留 `--main-program-type`,详情查询改为 `--snapshot draft|published` 并发送 `snapshot`,兼容旧 `--type` 别名。 - 创建时响应模式缺省或为空,默认发送 `mention_only`;更新未传则保留原值,显式响应模式不会被默认值覆盖。发布前的完整配置由服务端校验。 - 登录/连接使用已发布详情的 `profile.corpId/userId`,不再要求旧 `robotUid/staffId` 字段;换票后仍在线核验身份,再保存精确 Profile。 - MCP 创建/替换配置的帮助、Schema 与技能示例明确要求显式填写 `configString.mcpServers.<名称>.type`(`streamable-http` 或 `sse`),避免只有 URL 时服务端校验失败。 - 创建数字员工必须显式指定 `--main-program-type open_code|local_agent`,DWS 本地拒绝缺失或空值,帮助/Schema/调用说明同步标为必填;更新不传仍保留原值。 - **Mail employee lookup by corporate email** — adds `mail user get --org-email` and `mail user batch-get --org-emails`, with Schemas for `mail.get_user_by_org_email` and `mail.batch_get_users_by_org_emails`. Batch lookup accepts 1–100 addresses before deduplication and returns matched employees plus `notFoundOrgEmails`. Both declare required input mappings, read-only safety, and result fields, and use platform-injected operator and organization identity. Direct single lookup validates the employee result and declared field types before reporting success, while retaining null/omitted not-found results and exact integer IDs. This check does not reject a batch because one item is bad. - **Mail batch partial results** — preserves confirmed employee and not-found results when individual inputs or response records fail. Partial output separates `succeeded`, `failed` and `unknown` entries (exit code 7). An explicit server rejection of an invalid batch address falls back to at most 100 deduplicated single-address lookups, including errors classified by the runtime transport; global authentication, permission and connection failures do not trigger that fallback. Unconfirmed results are never reported as not-found. Address-validation fallback recognizes the live service code `1001` as well as `SYSTEM_ERROR`; unrelated errors with either code remain failures. During fallback, global failures retain their original classification and exit status, with confirmed progress in structured error `details.partialResult`. Cancellation and raw PAT authorization errors are returned to the framework unchanged instead of becoming partial success. Agent guidance requires reading confirmed members from `succeeded` even on exit code 7, continuing authorized follow-up work with them and reporting unmatched, failed and unknown addresses. - **Large integer output precision** — preserves integer IDs beyond the exact `float64` range when decoding MCP text responses and through `--jq`, `--fields` and formatted output. - **International login is English-first** — `dws auth login --intl` now renders its terminal copy, the DingTalk authorization page (`lang=en-US`) and the callback success page in English without requiring `DWS_LANG=en`. A locale inherited from `LANG` no longer forces Chinese output; set `DWS_LANG=zh` explicitly to keep the Chinese copy. Domestic (`.com`) login keeps following `DWS_LANG`/`LANG` as before. - **Wait framework capability** — adds the reviewed `Contract.Wait` declaration (`contract.WaitSpec`) with three execution modes: `poll` (cadence-poll the leaf's `WaitPoll` hook), `event` (consume the leaf's `WaitEvents` push stream, correlate events to the accepted resource via `match_field`/`resource_query`, apply the same terminal map), and `auto` (event first, fall back to polling when the stream ends or the subscription fails — one deadline spans both phases). Declared commands must use the `ResultInvoke` dispatcher; mode and hooks are paired at construction (poll↔WaitPoll, event↔WaitEvents, auto↔both; surplus hooks are rejected too). Declared commands register `--wait` / `--wait-timeout` (framework-owned flags that never enter MCP toolArgs); undeclared commands reject the flags as unknown. The wait phase closes the unified envelope exactly once: terminal success → `success`, terminal failure → `failure` with new wire-stable `error.type: "wait"` (exit code 8), timeout → `pending` with `meta.operation.timed_out: true` and the last observed state (exit 0). Deadline exhaustion during a poll, during event consumption, or between polls always closes as timed-out pending, never as a poll/stream failure; a correlated event with an unknown status fails closed exactly like a poll. The pairing also closes the overlay path: `AttachContract` / Tier2 metadata attaches cannot publish a wait declaration (no hooks, no flags, no wait phase behind it) — only the managed `New` construction can. At Schema assembly every `poll_command` is resolved against the bound registry and must name a delivered, agent-visible read command, so the declared manual resume path cannot drift from the command tree. The capability is projected into the Schema catalog (`wait` key) alongside `dry_run`. No business command declares it yet; approval/export/batch adoption lands separately. ### Changed - **Smart chat read shortcuts** (`+chat-messages`, `+at-me`, `+search-msg`, `+thread-replies`) now decrypt third-party encrypted (SafeChat) message ciphertext before projection when the message crypto policy allows it. Message projections gain `contentDecrypted`, `cryptoLayer`, and `dingKeyVersion` (when > 0), and payloads gain an additive decrypt ledger (`decryptCandidateCount`, `decryptAllowedCount`, `decryptedCount`, `decryptFailedCount`, `decryptFailures[]`). Single-item failures land in the ledger with `partial: true` and never change the command exit code. Policy-off keeps the ciphertext and records one `policy_disabled` failure per candidate, so the additive ledger appears with `decryptFailedCount >= 1` and the existing `partial` field can flip to `true`; only stub builds and `--dry-run` short-circuit the decrypt pipeline and keep output byte-identical to the previous behavior. - **`intField` in the message crypto module now accepts `json.Number`**, so `keyVersion` fields surfaced as JSON numbers by the MCP runtime are parsed instead of being silently dropped. The atomic chat read path may now emit `dingKeyVersion` on decrypted message projections (additive and within the existing result contract). Parsing `ttlSeconds` the same way means the crypto policy cache now honors the server-provided TTL: atomic reads fetch the policy once per conversation within the TTL window instead of once per message. - Introduce Schema delivery inside the existing Schema command of the single `dws` executable. Production does not produce or embed Schema identity at compile or release time. On supported ends (darwin/linux/windows amd64/arm64) each machine generates identity from live declarations at install or first `dws schema`, writes authenticated protobuf shards under the shared or user cache directory, and later hits verify digests then read those shards. Miss or corruption repairs from live assembly; when the shared cache exists but cannot be locked for repair (typically root-owned read-only), the repair falls back to the per-user cache and later processes reuse it. Empty local identity generates then uses the cache; it is not a permanent live-only mode. When plugins or other runtime extensions change the command surface, cache assembly and repair are delegated to an isolated child process using the pristine pre-registration environment, keeping persistent cache active without inheriting plugin runtime side effects. Plugin commands never enter the Schema surface, cached or live. The POSIX installer only advertises a cross-user shared cache when the warmed artifacts are root-owned, matching the runtime's shared-path ownership rule; a cache warmed by an ordinary user under a writable custom root is reported as installing-user-only instead. - Keep one complete Cobra tree for every public invocation. Compact typed metadata and shared builders reduce complete-tree allocations; process argv does not select a product factory or a utility-only tree. - Reduce temporary allocations during Schema validation and command initialization. - Normative notes live in `docs/rfc-schema-runtime-cache.md` only; no sibling plan/design/performance pages are kept. ### Removed - **Retire legacy contract review CLI leaves** — hide `dws contract review benefit|create|analysis|result` from help and mark their Agent Schema availability `unavailable`. The commands remain as hidden historical argv stubs and fail closed with `command_retired` without calling legacy review MCP tools. The `review` group stays visible because hiding it is not in the consumed ledger. Ledger `schema_availability_hardening` entries are consumed. ### Fixed - **OA TableField examples** (#1347) — correct mono and multi skill examples to encode detail rows as a two-dimensional array of `name`/`value` objects, and clarify that both creation modes preserve the serialized value without converting row objects. - **Persistent Schema cache with plugins** (#1400) — delegates Schema cache assembly and repair to an isolated child process when plugins are present, keeping persistent cache active without inheriting plugin runtime side effects. - **AI Table form sharing** now exposes server-returned `shareFormUuid`, status, and cover through shared structured result contracts for atomic commands and shortcuts; updates also publish `cpSynced`. Agent guidance requires confirming CP synchronization before reporting the sharing workflow as complete. Readback and CP projection remain the server's responsibility; DWS does not issue a second view update or construct cover URLs. - Atomic and shortcut updates now share strict terminal validation. Missing or invalid required fields, including `cpSynced=false`, produce `partial_failure` (exit 7), preserve the remote response and mark remote execution as started without retrying the write. Result Schema documents both verified success and partial-stage evidence. Usage guidance distinguishes supplied IDs from placeholders and preserves the shortcut JSON flag. - Terminal validation binds `baseId`, `tableId`, and `viewId` to the original request before accepting CP synchronization. A complete response for a different form is still `partial_failure`, even with `cpSynced=true`; both command entries retain the raw response and never replay or compensate the write. - Terminal validation also compares the explicitly requested `enabled`, `formName`, and `formDesc` against the echoed readback, so a response reporting different values is `partial_failure` rather than success. Requested properties the helper never echoes cannot be proven, so verified success reports `verified=false` and lists them in `unverified` instead of implying they took effect. - All four form-share Result Schemas accept their real dry-run request previews, including the optional shortcut `dry_run` marker. Preview success never implies remote execution or CP synchronization; assembled-leaf regression tests validate real envelopes against both full and compact JSON Schemas. - Skill discovery preserves the requested atomic/shortcut entry for result reviews instead of substituting usage Help. Interpretation selects the actual result branch and does not invent required fields or copy Schema evidence into malformed samples. - Recovery reviews preserve the target named in the original user request before Skill loading. Agent-authored Skill arguments cannot turn a background write into an additional contract-review target; this scope boundary is visible in discovery metadata as well as the loaded body. Synthetic JSON receipt reviews also load the product Skill: prohibiting online business operations does not skip local contract discovery or permit generic guesses about product-specific fields. - **AI Table write recovery**: `+table-copy` and `+record-batch-create` now generate one UUID v4 `clientToken` per create batch, submit it once, and reconcile uncertain receipts through MCP `get_record_write_result`. A fully recovered ID set is independently checked against record values before continuing. Unknown or partial results preserve the token/IDs and stop without replaying creation. The new read-only `+record-write-result` command exposes the recovery path in Help and Schema. - **AI field readiness**: `+field-create` recognizes MCP `CREATE_FIELD_READBACK_PENDING`, keeps the created IDs, and uses the existing bounded exact-ID readback/resume path. `+field-run-ai` requires readable `aiConfig` before mutation and reports `submitted` only for complete per-field task receipts; submission is not computation completion. - **Review follow-up**: duplicate-token errors and explicit `get_record_write_result` recovery hints no longer count as input rejections, even with `retryable=false`. They use the original token for read-only reconciliation and value verification; ordinary input rejections still stop immediately. - **Recovery evidence**: unknown creates without returned IDs do not advertise known effects. The read-only reconciliation command includes its Intent, and its Result Schema distinguishes verified `applied` results from dry-run previews and rejects unknown or incomplete success objects. - **Pagination recovery**: record queries classify business errors before accepting an empty terminal page. Invalidated cursors discard accumulated records and continuation tokens, return non-retryable restart guidance, and stop composite workflows before further writes. - **Agent recovery guidance**: the Shortcut Schema and mono/multi pagination references distinguish invalid snapshots from ordinary resumable failures; stale snapshots must discard prior rows and cursors, never deduplicate and concatenate pages across snapshots or replay a composite write. - **Pagination review boundary**: mono/multi references separate a concise, complete recovery assessment from operational query recipes. Unknown or incomplete writes remain read-only until reconciled; comparing query results is not permission to infer missing records or propose incremental create/backfill. - **Focused recovery discovery**: field-create Help/Schema explains `CREATE_FIELD_READBACK_PENDING` and bounded same-ID verification. Result-only reviews stay on the requested recovery command instead of expanding to its upstream write command or inferring unpublished Result fields from repeated discovery. - **Skill loading and routing**: keep the AITable skill description focused on capability selection, with execution examples in the loaded body. Contract reviews preserve the requested command identity and query only that command, without treating background writes as additional discovery targets. Regression tests enforce this metadata/body boundary and all four exact form-share review routes. - **Recovery review clarity**: lead with the requested read-only next step and safety decision, distinguishing local contract discovery from unverified remote state. When no command is requested, answer all safety questions up front—write replay, retained/discarded results, and read-only recovery prerequisites—before detailed explanation. Unknown or incomplete results retain the original Base/Table/token reconciliation route instead of switching to full-table queries. Reconciliation Schema explicitly treats records missing from the returned ID set as unverified, never as a count-based backfill plan. - Deployment dependency: the paired MCP branch must be deployed and the new read-only tool registered in the gateway. No `lippi-doc-notable` changes are included. Local mock/contract tests do not establish live service readiness; real-environment evaluation remains a separate deployment check. - 登录过程中使用临时 Token 补全身份时,立即应用本次登录的 MCP 端点覆盖,包括国内及国际预发;不再等待登录成功后的 `mcp_url` 持久化。显式产品端点、第三方地址和插件所属路由保持原值,查询不读取旧 Profile。 - Windows 原生覆盖率作业的总时限从 20 分钟调整为 30 分钟,为完整测试批次、工具链准备和产物上传保留余量,避免接近 20 分钟的运行被取消。测试范围、单批测试超时、100% 变更代码覆盖率门禁及汇总依赖检查保持原有要求。 - **DEK missing relogin** — Allow reauthorization when the local login encryption key is missing. Keep old ciphertext until a fresh credential is available, then replace only the login write targets and create a new encryption key as needed. Refresh and transient Keychain failures retain their existing protection. - 数字员工 Skill 创建和更新使用同一个已打开的文件完成 ZIP 校验与流式上传,避免校验后重新打开路径时把替换文件或符号链接目标上传。上传仅读取校验时的文件大小,句柄在操作结束(包括 dry-run 和失败)后关闭。 - 补充普通文件替换和符号链接替换的 create/update 回归测试,保留打开前对命名管道等特殊文件的拒绝;增加 `dingtalk_tag.skill_package_validated`、`dingtalk_tag.file_upload` 本地诊断事件,仅记录大小、阶段、接口路径、成功状态与耗时,不记录本地路径、文件内容、身份或凭据。 - 修正数字员工接入的事件传输就绪判断:使用上游真实状态并报告断线重连,区分 IPC、Agent 初始化和事件连接;DSH 状态交叉验证同一员工的 Event Bus,旧版或未知连接不再报告传输就绪。 - 数字员工本地 Agent 不再固定指定事件来源为 `digital_employee`,改为沿用 Event 默认规则:优先读取 `DWS_STREAM_SOURCE_ID`,未设置时开源版使用 `open`;升级后需重启员工 worker 生效。 - 个人 Stream 正确响应系统 ping/disconnect,不将系统控制帧投递为业务消息;订阅查询兼容 `items`/`list` 及字符串/整数时间戳。 - 修正 Windows 下正常停止可能被误报为消费者异常退出,以及损坏的任务/绑定目录被误当作不存在的问题;补充跨平台身份、绑定回执、上传失败、重试隔离和日志脱敏回归测试。 - **单聊引用回复** — 会话信息明确返回 `singleChat: true` 时,即使省略群聊话题开关,也能正常引用回复;保留会话身份、响应有效性及话题标记校验。 - **OA approval event fields** — preserve `staff_id`, `activity_id`, `corp_id`, and `business_id` from the business payload in `event consume --flatten` for all seven OA approval events, and expose `cc_time` for approval instance CC events. Optional fields remain omitted when absent; an explicitly provided zero `cc_time` is preserved. - **Legacy token pre-login recovery** — Allow OAuth, device, auth-code, PAT, and `--token` reauthorization to start when the legacy `auth-token` ciphertext has a confirmed DEK mismatch. The old ciphertext remains untouched until fresh credentials are available, then only the login's target slots are replaced; transient and unclassified Keychain failures still fail closed. - **Windows cgo 崩溃**:重新编译 Windows amd64/arm64 预编译 `libsafechat.a`(消除 legacy `_vsnprintf`/`__imp__*` dllimport 引用),并移除已无必要的 `msvcrt_compat_windows.c` 旧 CRT 桥接层,修复官方发布包在 Windows 上初始化 safechat(cgo)即崩溃的问题。 - Root help renders the live complete Cobra tree, so explicitly registered supplement-backed commands stay visible alongside products and utilities. There is no separate declaration-derived help snapshot. - **Command validation errors** — report framework-owned parameter failures consistently as validation errors with exit code 3, while preserving API errors, explicit exit codes, cancellation, and deadlines. - **Parent and proxy flags** — route parent traversal and wiki proxy parse failures through the same validation boundary and preserve target command hints. - **Required flag wording** — framework-prepared commands now report `missing required flag(s): --name` instead of Cobra’s `required flag(s) "name" not set`. The original Cobra error remains available as the cause. - **Generated commands** — normalize native validation failures in lazily created help/completion commands, and remove duplicate required/group checks while retaining business hook order. ## [1.0.62] - 2026-09-16 This stable release promotes the sealed `v1.0.62-beta.8` baseline and adds verified AI Table, document, event, calendar, chat, AISearch, and language-default improvements merged afterwards. ### Changes since `v1.0.62-beta.8` ### Added - Add AI Table shortcuts for exact field/view resolution, bounded record reads and NDJSON export, batch record/field creation with readback and recovery, App pages and widgets, forms, dashboards, aggregation, and attachment downloads. Preserve existing entry points and equivalent aliases; reject incomplete pagination, mismatched write verification, and unverified AI submission receipts instead of reporting success. Downstream capability and permission limitations remain explicit. - **Doc shortcut workflows** — add local and online document structure checks with `doc +script`, verified standalone media upload with `doc +media-upload`, optional title fallback, and ordered media attachments during document creation. - **Doc reading and editing** — add direct-folder search filtering, readable date filters, chapter and regex block-context reads, document comments, and verified same-document block copying and range editing while preserving existing commands and aliases. Range edits remain sequential, not atomic. - **Doc media controls** — add clipboard image input, attachment preview/summary selection, vertical cover positioning, persistent preview output, and explicit download overwrite; fix tag filtering and keep upload progress off JSON stdout. - **Doc download confirmation** — use `doc +download-overwrite --source media|cover` for confirmed replacement of local files. Existing media, preview, and cover downloads retain their no-clobber behavior and safety contracts; preserve the preview output shorthand `-o`. - **Create with media confirmation** — use `doc +create-with-media --media-files` to create a document and upload local images or attachments after confirmation. Plain `doc +create` retains its published behavior and does not accept media uploads. ### Changed - **AITable query routing** (#1342) — clarifies routing among raw record queries, server-side statistics, PostgreSQL analysis, and full data export. - **默认界面语言** — 未设置语言或语言值不受支持时,默认使用简体中文;保留 `DWS_LANG` 优先于 `LANG` 的解析顺序及显式英文设置。 ### Fixed - **Personal events** now obtain managed AppKey metadata when it is missing locally in open-source normal mode, without requiring an AppSecret or changing saved credentials. Existing application identities retain precedence, background listeners reuse the resolved AppKey, and metadata failures report actionable retryability. - Clarify AISearch evidence checks for time, identity, relevance, uniqueness, and same-condition handoffs to native products. - Guide newly shared AI Table forms to pass their known title through `--form-name`; require usage-only Agent answers to perform exactly one safe leaf discovery query, then lead with a complete command or an explicit placeholder template without guessing missing IDs, and state that omitted share settings stay unchanged without claiming execution; reject undeclared record-comment rich-content fields before invoking MCP; preserve actionable comment visibility errors; and move AI Table comments, record ID pagination, entity search, and PSQL machine output onto reviewed unified result contracts whose dry-run previews satisfy the published Result Schema and whose comment pagination guidance reads continuation state from `meta.pagination`. - **Calendar invitation receipts** — fixes false `readback_attendee_missing` failures from `calendar +invite` and `calendar +book --with` when participant responses omit user IDs and display names differ from directory names. Invitations require an explicit successful write receipt and report `verified=false`; `+invite` adds `acknowledged=true`, while `+book --with` adds `attendeesAcknowledged=true` and retains event readback through `eventVerified=true`. - **Chat rich-text links** — preserve link-item URL targets alongside their labels in message projections, including links without labels. ## [1.0.62-beta.8] - 2026-09-11 ### Added - **OA approval template management** (#1346) — add `dws oa approval template list` and `detail --template-code ` for querying manageable approval templates, form schemas, and process configuration. - **Interactive card callback events** ([Aone 86136546](https://project.aone.alibaba-inc.com/v2/project/2125919/req/86136546)) — `dws event consume user_card_action_triggered` reuses the personal-event subscription lifecycle with the same empty-object filter rule as IM/OA. Its flattened schema describes typed answers and questions under `payload.body.actionData.context`, business/conversation/operator fields under `payload.body`, and millisecond timestamps while preserving unknown fields for forward compatibility. - **AI 表格记录评论** — 新增评论的分页查询、创建、回复、完整更新和删除命令,支持纯文本、@人员及已上传图片。 - **Calendar event options** — adds `--is-all-day` and `--add-online-meeting` to `calendar event create` and `update`, with omission-preserving boolean updates. Explicit all-day state changes require both start and end values, validated as dates or timezone-bearing date-times for the selected state. - **A2UI card options** — adds optional `--a2ui-annotations` JSON object arrays to card creation and updates, and `--support-forward` to creation (defaults to false). - **Public Agent Skills CLI** — `npx skills add DingTalk-Real-AI/dingtalk-workspace-cli -g` installs the per-product `dingtalk-*` skills after confirming the skills, target directories, and existing same-named content handling. The all-in-one mono `dws` skill is marked `metadata.internal: true` so it is not a default installable skill. `dws skill setup` remains the China / upgrade / ownership path. - **Schema 时间格式声明** — 支持字符串参数以 `anyOf` 声明多个格式,并为日历创建/更新的 `date-time` 到 `date`/`date-time` 扩展及全天状态条件必填提供精确、基线持有的迁移校验;其他格式和条件必填变更仍被拦截。 - **Standalone whiteboard export** — adds `whiteboard export` and `whiteboard export-get` to download PNG/PDF exports. Both commands support request-only dry-run previews. Signed URL query strings do not affect filenames; downloads validate their file signatures before atomic publication and never overwrite existing files. Failed tasks retain recovery instructions with the job ID, format, and output directory. Downloads enforce HTTPS/443 public network targets on redirects and actual connections, with a 512 MiB limit for both declared and streamed response sizes. ### Changed - **AI Table CLI safety and compatibility** — adds safe entity resolution for view filters, strengthens dashboard, workflow, import, record, and table validation, supports the latest Base copy and share-form protocols, and aligns Runtime Schema and Skill guidance with observable MCP behavior. - Update the embedded CLI telemetry SDK to v0.4.0 and send completed command events from a bounded background process, preserving existing telemetry fields and keeping network waits out of command execution. - Update the embedded runtime SDK to 20260909 and remove auxiliary ps files from builds and runtime extraction, reducing single-binary package size. - Refresh the macOS universal runtime library while retaining the 1 MiB payload slot and using the payload digest to upgrade existing installations of the same resource version. ### Fixed - **Direct-runtime MCP endpoint resolution** (#1331) — restore the environment-aware `mcpdev` endpoint so `dws dev mcp` commands reach the backend instead of failing locally with `endpoint_not_resolved`. - Automatic pagination now preserves cancellation when the page-delay timer and context cancellation become ready together, rather than randomly continuing. - **OA approval list response types** (#1351) — normalize `success` to a boolean and numeric error codes to `errorCode` for pending, submitted, and copied approval lists while preserving business data and diagnostics. - Preserve optional `--source-config` for AI Table datasource updates: read and reuse the complete existing configuration when omitted, and stop before updating if the read cannot provide a valid configuration. - **AI Table capability routing** — isolates concurrent multi-profile discovery so each `tools/list` request uses the selected account without changing the process-wide profile. - Include the available runtime context in manual OAuth and device authorization links, including `--no-browser`, so copied links match browser authorization. Display device links outside a frame to keep long URLs copyable on narrow terminals. - Stop adding the CLI locale as a `lang` query parameter to browser, manual, and reauthorization login links. - **Chat read completeness contracts** — makes conversation and message reads distinguish normal bounded truncation from terminal pagination, projection, enrichment, and resource-download failures. Incomplete reads retain their canonical partial result and typed retry diagnostics, while newly declared Result and pagination contracts remain in byte-compatible dual validation before activation. - **Chat routing and bounded discovery** — distinguishes conversation categories from real chat groups, aligns reviewed Shortcut owners with runtime selection and references, and steers agents toward narrow leaf Schema before a single exact Help fallback. - **Public Schema constraint closure** — normalizes reviewed hidden aliases to their public parameters and rejects constraints that cannot be represented without exposing hidden runtime inputs. - **Drive and Wiki agent workflows** — align pagination, confirmation, target verification, recovery receipts, and Reference routing with runtime behavior. - Stop implicit HTTP retries of MCP tool invocations after gateway or connection failures, preventing duplicate datasource updates and other remote writes. Discovery and explicit read/reconciliation retry policies retain their existing behavior. - **Minutes artifact evidence** — distinguish empty action items, unsupported responses and speaker-task terminal states; preserve list display metadata and complete upload/permission preview options. - **Minutes export and delivery** — remove signed credentials from exported text, keep partial results explicit, and align time conversion, pagination, permissions and cross-product report guidance with verified runtime behavior. - Fix the Windows whiteboard export test to compare decoded JSON paths, and run platform app coverage tests in fresh batches while retaining the full test selection, cross-package instrumentation, and coverage gate. ### Security - **AI 表格文件导入** (#1349) — 将上传白名单收紧为服务配置的精确 OSS Bucket 主机与导入对象路径,拒绝同区域其他 Bucket、区域根域和路径式 Bucket URL;复用公网传输 IP 策略,在上传前阻止共享地址段、保留地址及特殊 IPv6 目标。 ## [1.0.62-beta.7] - 2026-09-09 ### Added - **Chat active conversations** — adds `dws chat +active-conversations --start