feat: 接入组织大脑4
This commit is contained in:
@@ -84,6 +84,7 @@ cli_version: ">=1.0.15"
|
||||
| `ding` | DING消息:发送/撤回(应用内/短信/电话) | [ding.md](./references/products/ding.md) |
|
||||
| `doc` | 钉钉文档:搜索/浏览/读写/块级编辑/评论/文件创建/复制/移动/重命名/**删除/导出 docx/权限管理/媒体上传下载** | [doc.md](./references/products/doc.md) |
|
||||
| `drive` | 钉钉云盘:文件列表/元数据/文件夹/上传(两步)/下载 | [drive.md](./references/products/drive.md) |
|
||||
| `hrbrain` | 组织大脑:人才池管理/员工档案查询(元数据/批量数据/标签/职业历程/绩效)/人才搜索(简单条件与高级结构化搜索) | [hrbrain.md](./references/products/hrbrain.md) |
|
||||
| `minutes` | AI听记:听记列表/摘要/关键词/转写/待办/思维导图/发言人/发言人段落总结/热词/录音控制/成员权限/上传 | [minutes.md](./references/products/minutes.md) |
|
||||
| `oa` | OA审批:待处理/详情/同意/拒绝/撤销/记录/已发起/任务/转交/评论/抄送 | [oa.md](./references/products/oa.md) |
|
||||
| `pat` | PAT 行为授权:浏览器策略/scope 预览/一次性、会话或永久授权 | [pat.md](./references/products/pat.md) |
|
||||
@@ -108,6 +109,7 @@ cli_version: ">=1.0.15"
|
||||
用户提到"DING/紧急消息/电话提醒" → `ding`
|
||||
用户提到"钉钉文档/云文档/知识库/读写文档/块级编辑/文档评论/文档复制移动" → `doc`
|
||||
用户提到"云盘/文件存储/文件上传下载/文件夹" → `drive`
|
||||
用户提到"人才池/储备干部池/员工档案/职业历程/绩效记录/员工标签/组织大脑/人才搜索" → `hrbrain`
|
||||
用户提到"听记/AI听记/会议纪要/转写/摘要/思维导图/发言人/热词" → `minutes`
|
||||
用户提到"邮箱/邮件/发邮件/收邮件/搜邮件/查邮件/邮件草稿/转发邮件/回复邮件/邮件附件/抄送" → `mail`
|
||||
用户提到"审批/请假/报销/出差/加班/同意/拒绝/撤销审批" → `oa`
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
# Hrbrain(组织大脑)
|
||||
|
||||
## 产品说明
|
||||
|
||||
Hrbrain 是钉钉组织大脑,提供人才池管理、员工档案查询、人才搜索三大能力,帮助 HR/管理者盘点人才、查询员工履历绩效、按条件检索人员。
|
||||
|
||||
**CLI 前缀**: `dws hrbrain`
|
||||
|
||||
> ⚠️ **权限粒度**:`talent-pool list` 等接口需要账号单独开通"人才池查看权限",即使账号已登录且其他 hrbrain 接口可用,仍可能因该细粒度权限缺失返回 `errorCode=2002`(无人才池查看权限)。
|
||||
|
||||
## 命令总览
|
||||
|
||||
### talent-pool (人才池管理)
|
||||
|
||||
| 命令 | 用途 | 必填参数 | 备注 |
|
||||
|------|------|----------|------|
|
||||
| `talent-pool list` | 查询人才池列表 | - | 可选 `--keyword`、`--pool-type`、`--creator`、`--labels`(逗号分隔)、`--page`、`--page-size`(默认 1/20) |
|
||||
| `talent-pool detail` | 获取人才池详情 | `--pool-code` | 根据人才池编码查询 |
|
||||
| `talent-pool employees` | 查询人才池内人员列表 | `--pool-code` | 可选 `--page`、`--page-size`(默认 1/20) |
|
||||
|
||||
### profile (员工档案管理)
|
||||
|
||||
| 命令 | 用途 | 必填参数 | 备注 |
|
||||
|------|------|----------|------|
|
||||
| `profile metadata` | 查询员工档案元数据结构 | `--work-no` | 用于构造 `profile query` 的 `--data-queries` |
|
||||
| `profile query` | 按模块批量查询员工档案数据 | `--work-no` `--data-queries` | `--data-queries` 为 JSON 数组,每项含 `modelCode`(档案模块编码)与 `fields`(字段编码列表) |
|
||||
| `profile labels` | 获取员工标签 | `--staff-ids` | `--staff-ids` 为逗号分隔工号列表;可选 `--all-label` |
|
||||
| `profile career` | 查询员工公司内职业历程 | `--work-no` | - |
|
||||
| `profile performance` | 查询员工绩效记录 | `--work-no` | - |
|
||||
|
||||
### search (人才搜索)
|
||||
|
||||
| 命令 | 用途 | 必填参数 | 备注 |
|
||||
|------|------|----------|------|
|
||||
| `search employees` | 人才搜索 | - | 可选 `--keyword`、`--dept-name`、`--position-name`、`--job-level`、`--pool-code`、`--page`、`--page-size` |
|
||||
| `search employees-structured` | 使用高级条件搜索人员 | `--origin-json` `--fields` | 建议先调用 `search fields` 获取有权限的字段与操作符列表;`--origin-json` 为搜索表达式 JSON,`--fields` 为返回列定义 JSON 数组;可选 `--order-by`(逗号分隔)、`--page`、`--page-size` |
|
||||
| `search fields` | 获取高级搜索字段列表 | - | 获取当前操作人有权限使用的字段,用于构造 `search employees-structured` 的参数 |
|
||||
|
||||
## 意图判断
|
||||
|
||||
用户说"人才池/储备干部池":
|
||||
- 查看列表 → `talent-pool list`
|
||||
- 详情 → `talent-pool detail`
|
||||
- 池内人员 → `talent-pool employees`
|
||||
|
||||
用户说"员工档案/档案数据/员工信息模块":
|
||||
- 元数据结构 → `profile metadata`
|
||||
- 批量查数据 → `profile query`(先 `metadata` 确认字段编码)
|
||||
|
||||
用户说"员工标签/人才标签":
|
||||
- `profile labels`
|
||||
|
||||
用户说"职业历程/职业发展/内部履历":
|
||||
- `profile career`
|
||||
|
||||
用户说"绩效记录/绩效考核历史":
|
||||
- `profile performance`
|
||||
|
||||
用户说"搜人/人才搜索/按条件找人":
|
||||
- 简单条件(关键词/部门/职务/职级)→ `search employees`
|
||||
- 复杂组合条件 → 先 `search fields` 获取字段,再 `search employees-structured`
|
||||
|
||||
## 核心工作流
|
||||
|
||||
```bash
|
||||
# 人才池列表与详情
|
||||
dws hrbrain talent-pool list --page 1 --page-size 20 --format json
|
||||
dws hrbrain talent-pool list --keyword "储备干部" --pool-type TYPE --creator USER_ID --format json
|
||||
dws hrbrain talent-pool detail --pool-code POOL_CODE --format json
|
||||
dws hrbrain talent-pool employees --pool-code POOL_CODE --page 1 --page-size 20 --format json
|
||||
|
||||
# 员工档案:先查元数据确定字段编码,再批量查数据
|
||||
dws hrbrain profile metadata --work-no WORK_NO --format json
|
||||
dws hrbrain profile query --work-no WORK_NO \
|
||||
--data-queries '[{"modelCode":"basic","fields":["name","dept"]}]' \
|
||||
--format json
|
||||
|
||||
# 员工标签、职业历程、绩效
|
||||
dws hrbrain profile labels --staff-ids WORK_NO1,WORK_NO2 --all-label --format json
|
||||
dws hrbrain profile career --work-no WORK_NO --format json
|
||||
dws hrbrain profile performance --work-no WORK_NO --format json
|
||||
|
||||
# 人才搜索:简单条件
|
||||
dws hrbrain search employees --keyword "张三" --page 1 --page-size 20 --format json
|
||||
dws hrbrain search employees --dept-name "技术部" --job-level P7 --pool-code POOL_CODE --format json
|
||||
|
||||
# 人才搜索:高级条件,先获取字段列表
|
||||
dws hrbrain search fields --format json
|
||||
dws hrbrain search employees-structured \
|
||||
--origin-json '{"rules":[{"field":"name","operator":"contains","value":"张"}],"combinator":"and"}' \
|
||||
--fields '[{"label":"姓名","value":"name"}]' \
|
||||
--page 1 --page-size 20 --format json
|
||||
```
|
||||
|
||||
## 上下文传递表
|
||||
|
||||
| 操作 | 从返回中提取 | 用于 |
|
||||
|------|-------------|------|
|
||||
| `talent-pool list` | `poolCode` | `talent-pool detail` / `talent-pool employees` 的 `--pool-code` |
|
||||
| `talent-pool employees` | `workNo` | `profile *` 系列命令的 `--work-no` |
|
||||
| `profile metadata` | `modelCode`、`fields` | `profile query` 的 `--data-queries` |
|
||||
| `search fields` | 字段 `value`/`label` 列表 | `search employees-structured` 的 `--fields`、`--origin-json` 中的 `field` |
|
||||
| `search employees` | `workNo` | `profile *` 系列命令的 `--work-no` |
|
||||
|
||||
## 注意事项
|
||||
|
||||
- `--data-queries`、`--fields`、`--origin-json` 均为 JSON 字符串参数,必须是合法 JSON,否则命令直接报错。
|
||||
- `--staff-ids`、`--labels`、`--order-by` 为逗号分隔字符串,非 JSON 数组。
|
||||
- `--page`/`--page-size` 默认值为 1/20;全局安装的旧版本 `dws` 可能不识别分页 flag,需确认二进制版本已包含 hrbrain 分页支持。
|
||||
- `talent-pool list` 需要账号单独开通人才池查看权限;返回 `errorCode=2002` 时提示用户联系管理员开通权限,而非重试或换 profile。
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
name: dingtalk-hrbrain
|
||||
description: 钉钉组织大脑 Hrbrain。Use when 用户说 人才池/储备干部池/员工档案/职业历程/绩效记录/员工标签/组织大脑/人才搜索。Distinct from dingtalk-contact(通讯录/组织架构)、dingtalk-attendance(考勤)。命令前缀:dws hrbrain。
|
||||
cli_version: ">=0.2.14"
|
||||
metadata:
|
||||
category: product
|
||||
stability: experimental
|
||||
requires:
|
||||
bins:
|
||||
- dws
|
||||
---
|
||||
|
||||
# 钉钉 Hrbrain(组织大脑)Skill
|
||||
|
||||
> 🧪 **EXPERIMENTAL · 试验版 / Preview** — multi 模式当前未达 stable 标准。全部 dingtalk-* skill 已通过 dispatch verifier,但接口、命名、跨 skill 引用后续可能调整;生产 / 共享环境请优先使用 mono 模式(`dws skill setup --mode mono`)。问题请提 issue 反馈。
|
||||
|
||||
> **PREREQUISITE:** Read the `dws-shared` skill first for auth, global flags, product routing, URL preflight, error codes, and safety rules. The `dws` binary must be on PATH.
|
||||
|
||||
<!-- SAFETY_PREAMBLE_INJECT -->
|
||||
|
||||
> ⚠️ **命令可用性以当前 dws 二进制为准**。服务发现已下线,本文档随内置 skill 发布;如果 `dws <cmd> --help` 不存在,说明当前版本未暴露该命令。若命令存在但调用失败,请按错误中的 endpoint 或 tool 提示确认静态端点目录和后端工具注册。实际调用前可用 `dws <cmd> --help` 或 `--dry-run` 验证。
|
||||
|
||||
> 命令参考:[hrbrain.md](references/hrbrain.md)。
|
||||
|
||||
## 意图表
|
||||
|
||||
| 用户说 | 命令 |
|
||||
|--------|------|
|
||||
| "人才池列表 / 储备干部池" | `dws hrbrain talent-pool list` |
|
||||
| "人才池详情" | `dws hrbrain talent-pool detail --pool-code <POOL_CODE>` |
|
||||
| "人才池里有哪些人" | `dws hrbrain talent-pool employees --pool-code <POOL_CODE>` |
|
||||
| "员工档案元数据 / 档案结构" | `dws hrbrain profile metadata --work-no <WORK_NO>` |
|
||||
| "查员工档案数据" | 先 `profile metadata` 确认字段编码,再 `dws hrbrain profile query --work-no <WORK_NO> --data-queries '[...]'` |
|
||||
| "员工标签" | `dws hrbrain profile labels --staff-ids <WORK_NO1,WORK_NO2>` |
|
||||
| "职业历程 / 内部履历" | `dws hrbrain profile career --work-no <WORK_NO>` |
|
||||
| "绩效记录" | `dws hrbrain profile performance --work-no <WORK_NO>` |
|
||||
| "搜人 / 按条件找人(简单)" | `dws hrbrain search employees --keyword <关键词>` |
|
||||
| "搜人(复杂组合条件)" | 先 `dws hrbrain search fields` 获取字段,再 `dws hrbrain search employees-structured --origin-json '{...}' --fields '[...]'` |
|
||||
|
||||
## 权限与约束
|
||||
|
||||
- `talent-pool list` 需要账号单独开通"人才池查看权限",返回 `errorCode=2002` 时提示用户联系管理员开通,不要重试或换 profile。
|
||||
- `--data-queries`、`--fields`、`--origin-json` 必须是合法 JSON 字符串;`--staff-ids`、`--labels`、`--order-by` 是逗号分隔字符串,不是 JSON。
|
||||
@@ -0,0 +1,65 @@
|
||||
# Hrbrain(组织大脑)
|
||||
|
||||
## 产品说明
|
||||
|
||||
Hrbrain 是钉钉组织大脑,提供人才池管理、员工档案查询、人才搜索三大能力。
|
||||
|
||||
**CLI 前缀**: `dws hrbrain`
|
||||
|
||||
## 命令总览
|
||||
|
||||
### talent-pool (人才池管理)
|
||||
|
||||
| 命令 | 用途 | 必填参数 | 备注 |
|
||||
|------|------|----------|------|
|
||||
| `talent-pool list` | 查询人才池列表 | - | 可选 `--keyword`、`--pool-type`、`--creator`、`--labels`(逗号分隔)、`--page`、`--page-size` |
|
||||
| `talent-pool detail` | 获取人才池详情 | `--pool-code` | - |
|
||||
| `talent-pool employees` | 查询人才池内人员列表 | `--pool-code` | 可选 `--page`、`--page-size` |
|
||||
|
||||
### profile (员工档案管理)
|
||||
|
||||
| 命令 | 用途 | 必填参数 | 备注 |
|
||||
|------|------|----------|------|
|
||||
| `profile metadata` | 查询员工档案元数据结构 | `--work-no` | 用于构造 `profile query` 的 `--data-queries` |
|
||||
| `profile query` | 按模块批量查询员工档案数据 | `--work-no` `--data-queries` | `--data-queries` 为 JSON 数组,每项含 `modelCode`、`fields` |
|
||||
| `profile labels` | 获取员工标签 | `--staff-ids` | 逗号分隔工号列表;可选 `--all-label` |
|
||||
| `profile career` | 查询员工公司内职业历程 | `--work-no` | - |
|
||||
| `profile performance` | 查询员工绩效记录 | `--work-no` | - |
|
||||
|
||||
### search (人才搜索)
|
||||
|
||||
| 命令 | 用途 | 必填参数 |
|
||||
|------|------|----------|
|
||||
| `search employees` | 人才搜索(简单条件) | - |
|
||||
| `search employees-structured` | 高级结构化搜索 | `--origin-json` `--fields` |
|
||||
| `search fields` | 获取高级搜索字段列表 | - |
|
||||
|
||||
## 意图判断
|
||||
|
||||
- "人才池/储备干部池" → `talent-pool list/detail/employees`
|
||||
- "员工档案/档案数据" → `profile metadata/query`
|
||||
- "员工标签" → `profile labels`
|
||||
- "职业历程/内部履历" → `profile career`
|
||||
- "绩效记录" → `profile performance`
|
||||
- "搜人/按条件找人" → `search employees`(简单)或 `search fields` + `search employees-structured`(复杂)
|
||||
|
||||
## 常用命令
|
||||
|
||||
```bash
|
||||
dws hrbrain talent-pool list --page 1 --page-size 20 --format json
|
||||
dws hrbrain talent-pool detail --pool-code POOL_CODE --format json
|
||||
dws hrbrain talent-pool employees --pool-code POOL_CODE --format json
|
||||
dws hrbrain profile metadata --work-no WORK_NO --format json
|
||||
dws hrbrain profile query --work-no WORK_NO --data-queries '[{"modelCode":"basic","fields":["name","dept"]}]' --format json
|
||||
dws hrbrain profile labels --staff-ids WORK_NO1,WORK_NO2 --format json
|
||||
dws hrbrain profile career --work-no WORK_NO --format json
|
||||
dws hrbrain profile performance --work-no WORK_NO --format json
|
||||
dws hrbrain search employees --keyword "张三" --format json
|
||||
dws hrbrain search fields --format json
|
||||
dws hrbrain search employees-structured --origin-json '{"rules":[{"field":"name","operator":"contains","value":"张"}],"combinator":"and"}' --fields '[{"label":"姓名","value":"name"}]' --format json
|
||||
```
|
||||
|
||||
## 安全规则
|
||||
|
||||
- `--data-queries`、`--fields`、`--origin-json` 必须是合法 JSON;`--staff-ids`、`--labels`、`--order-by` 是逗号分隔字符串。
|
||||
- `talent-pool list` 需要账号单独开通人才池查看权限(`errorCode=2002` 时提示用户联系管理员开通)。
|
||||
Reference in New Issue
Block a user