Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/1096-dangerous-command-confirmation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: 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.
5 changes: 5 additions & 0 deletions .changes/aitable-advanced-permission-role-members.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: 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.
15 changes: 15 additions & 0 deletions .changes/aitable-form-share-readback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
category: Added
---

- 表单分享更新按 MCP 回读的权限、匿名、查看范围、通知、时间及封面配置校验终态;已回读值矛盾时返回部分失败,旧服务端缺失字段或缺少资源对应证明时继续明确标记未验证。

- 补齐表单分享 get/update 的返回 Schema,并在结果中保留历史成员身份不可用的安全提示。修正表单列表中 UUID 和候选链接的 Help/Skill 说明。

- 对齐 MCP 表单分支的封面可信域名、端口及 URL 格式限制;保留已上传封面的结构化恢复 ID,并兼容非指定成员模式清空授权后的空字符串回读。催填 Help/Schema/Skill 统一使用当前组织 userId,由 MCP 复用身份转换并兼容历史 uid;提示结果不明时不自动重发,兼容不依赖旧客户端升级。

本地封面上传成功后配置更新失败时,整条命令禁止自动重试并清除重试时间建议,保留错误分类、原始诊断和资源恢复 ID,避免重复上传。

回执中的 enabled 与 status 相互矛盾时返回不可自动重放的部分失败,避免将关闭或受处罚的状态误标为已验证成功。

正数提交上限回读为 0(不限制)时按终态不一致处理;仅显式清除上限才接受 0。分享链接读取复用分享配置查询的只读退避重试,读取成功后只生成一次链接和二维码。
5 changes: 5 additions & 0 deletions .changes/chat-list-all-conversations-pagination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: Added
---

- `chat list-all-conversations` 新增显式 `--page-all` 自动翻页,并支持页数、条数和页间等待边界;默认单页行为保持不变。
13 changes: 13 additions & 0 deletions .changes/dingtalk-tag-qwenwork-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
category: Changed
---

- `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 和退出码,不覆盖服务端具体说明、不重试写操作。
5 changes: 5 additions & 0 deletions .changes/dwsh-53-npm-postinstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: 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.
5 changes: 5 additions & 0 deletions .changes/mcp-market-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: Added
---

- 新增 `dws mcp market search`:按名称关键词搜索钉钉 MCP 市场,返回 `mcpId`、名称、描述、服务名、提供方、是否官方和是否收费,可直接衔接 `dws mcp published tools <mcpId>` 与 `dws mcp url get <mcpId>`。支持 `--limit` 单页数量与 `--cursor` 续页;只覆盖已上架市场的 MCP,企业内发布但未上架市场的 MCP 不在结果中。
8 changes: 8 additions & 0 deletions .changes/public-business-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
category: Added
---

- 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.
5 changes: 5 additions & 0 deletions .changes/rate-limit-guidance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: Fixed
---

- **限流错误提示** — 当服务返回 `server_error_code=RATE_LIMIT_ERROR` 时,明确说明当前请求频率过高、本次请求被限流,并引导等待 10 秒后重试;其他错误码保持原有处理。
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,9 @@ jobs:
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
# The unchanged base already needs about nine minutes on hosted runners.
# Keep both complete coverage passes and allow for the expanded command tree.
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ How to pick:
npm install -g dingtalk-workspace-cli
```

Install only the CLI binary and skip all bundled Skill validation, extraction,
Agent-directory updates, state writes, and user-cache refreshes:

```bash
DWS_NO_SKILLS=1 npm install -g dingtalk-workspace-cli
```

```powershell
$env:DWS_NO_SKILLS = "1"
npm install -g dingtalk-workspace-cli
```

Without `DWS_NO_SKILLS=1`, npm keeps installing Skills as before. A failure
while refreshing the optional `~/.dws/skills` cache is reported as a warning
after the CLI and Agent Skills are installed; run `dws skill setup` to refresh
Skills later.

Install the latest beta:

```bash
Expand Down Expand Up @@ -245,7 +262,7 @@ The verifier uses isolated directories and does not replace the `dws` on the cur
1. **准备** — 官方开源版下载同版本的当前平台归档和技能包,强制验证大小、SHA256 及新二进制版本。自定义 Registry 保留完整 npm 包及完整性校验。验证失败时不替换现有安装。
2. **Apply** — only after all preparations succeed, the binary is replaced and skills are flattened into the canonical `~/.agents/skills` root. Agents classified by the pinned compatibility registry as supporting the universal root read it directly; other detected Agents receive links to the canonical copy, with a direct-copy fallback when links are unavailable. Older DWS-managed agent-specific copies are backed up and retired so the same Skill is not discovered twice.

独立二进制升级保留自动备份和 `dws upgrade --rollback`。包管理器安装的回退由对应管理器处理;npm/pnpm 安装不支持 `--skip-skills`,因为发布包的安装脚本会更新技能。Homebrew 捆绑技能,使用 `dws skill setup` 安装到 Agent 目录。
独立二进制升级保留自动备份和 `dws upgrade --rollback`。包管理器安装的回退由对应管理器处理;npm/pnpm 没有 `--skip-skills` 参数,但可设置 `DWS_NO_SKILLS=1` 仅安装 CLI 二进制。Homebrew 捆绑技能,使用 `dws skill setup` 安装到 Agent 目录。

| Flag | Description |
|------|-------------|
Expand Down Expand Up @@ -519,7 +536,7 @@ DWS_SKILL_SOURCE=/absolute/path/to/extracted-dws-skills dws skill setup --mode m

After a multi setup or upgrade, DWS stores the official bundle snapshot and centralized ownership metadata in `~/.dws/skills-state.json` (or `$DWS_CONFIG_DIR/skills-state.json`). Every upgrade installs and overwrites the complete bundled Skill set from that release. Deleting or excluding a bundled Skill is not sticky: the next upgrade restores it. `dws upgrade --force` additionally allows reinstalling the current CLI version when no newer version is available.

Env vars: `DWS_SKILL_MODE=mono|multi` (also honored by `install.sh` / `install.ps1`), `DWS_SKILL_SOURCE=<path>`.
Env vars: `DWS_NO_SKILLS=1` (npm, `install.sh`, and `install.ps1`; skips the complete Skill path), `DWS_SKILL_MODE=mono|multi` (also honored by `install.sh` / `install.ps1`), `DWS_SKILL_SOURCE=<path>`.

**What's included (mono layout):**

Expand Down
20 changes: 20 additions & 0 deletions build/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,23 @@

This package installs the `dws` executable and bundles the `DingTalk Workspace`
agent skills for local installation.

By default, npm installs the CLI and bundled Skills. Binary-only consumers can
skip the complete Skill path while keeping platform-archive validation and CLI
extraction:

```bash
DWS_NO_SKILLS=1 npm install -g dingtalk-workspace-cli
```

```powershell
$env:DWS_NO_SKILLS = "1"
npm install -g dingtalk-workspace-cli
```

With the variable set to exactly `1`, the postinstall script does not validate
or extract `dws-skills.zip`, write Agent Skill directories or state, or refresh
`~/.dws/skills`. Without it, Skill installation keeps its existing failure
contract. A failure limited to the optional user-cache refresh is reported as a
warning after the CLI and Agent Skills are installed; run `dws skill setup` to
refresh Skills later.
29 changes: 24 additions & 5 deletions build/npm/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -1813,21 +1813,32 @@ function resolveSkillMode() {
// is only refreshed when the new bundle actually carries that tree — an
// empty/corrupt multi/ (or a missing mono tree) must never wipe a previously
// good cache.
function cacheUserSkills(extractedSkillsRoot) {
const cacheBase = path.join(os.homedir(), ".dws", "skills");
function cacheUserSkills(extractedSkillsRoot, publishFn = publishCacheAtomically, homeDir = os.homedir()) {
const cacheBase = path.join(homeDir, ".dws", "skills");

const refreshCache = (label, sourceDir, cacheDir) => {
try {
publishFn(sourceDir, cacheDir);
} catch (err) {
console.warn(
`⚠️ ${label} Skill cache refresh failed at ${cacheDir}; the CLI is installed. ` +
`Run 'dws skill setup' to refresh Skills: ${err.message}`,
);
}
};

const monoSource = fs.existsSync(path.join(extractedSkillsRoot, "mono", "SKILL.md"))
? path.join(extractedSkillsRoot, "mono")
: extractedSkillsRoot;
if (fs.existsSync(path.join(monoSource, "SKILL.md"))) {
const monoCache = path.join(cacheBase, "mono");
publishCacheAtomically(monoSource, monoCache);
refreshCache("Mono", monoSource, monoCache);
}

const multiSource = path.join(extractedSkillsRoot, "multi");
if (multiTreeHasSkills(multiSource)) {
const multiCache = path.join(cacheBase, "multi");
publishCacheAtomically(multiSource, multiCache);
refreshCache("Multi", multiSource, multiCache);
}
}

Expand All @@ -1848,11 +1859,18 @@ function main() {
if (!fs.existsSync(archivePath)) {
throw new Error(`missing platform archive: ${archivePath}`);
}

extractArchive(archivePath, vendorDir);

if (process.env.DWS_NO_SKILLS === "1") {
console.log("DWS_NO_SKILLS=1 — skipping bundled Skill extraction, installation, state, and cache updates.");
return;
}

if (!fs.existsSync(skillsPath)) {
throw new Error(`missing skills archive: ${skillsPath}`);
}

extractArchive(archivePath, vendorDir);
extractSkills(skillsPath, skillsStaging);

// For backward compatibility, the zip root carries a copy of mono content
Expand Down Expand Up @@ -1897,6 +1915,7 @@ module.exports = {
copyPathLexicallySync,
movePathRecoverablySync,
publishCacheAtomically,
cacheUserSkills,
publishCanonicalLinksAtomically,
publishManagedMonoSkillSetAtomically,
publishManagedMultiSkillSetAtomically,
Expand Down
2 changes: 1 addition & 1 deletion docs/deap-digital-employee-detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dws dingtalk-tag manage detail --agent-uuid <agentUuid> --snapshot published
`--snapshot` 只接受 `draft` 或 `published`,默认 `draft`。CLI 映射到
`get_digital_employee_detail` 的 `snapshot` 字段。登录和连接内部的详情查询使用相同字段。

详情响应中的 `type` 表示主程序类型(`open_code` / `local_agent`)。
详情响应中的 `type` 表示主程序类型(`qwenwork` / `local_agent`)。
响应的 `snapshot` 表示本次读取的配置来源(`draft` / `published`)。
`status` 表示生命周期:`online` 为已发布,`dev` 为开发中,`offline` 为下架;
它不能单独证明本次读取的是 published 快照,也不代表本地 Agent 正在运行。
Expand Down
Loading
Loading