@lark-people/cli 0.0.0-beta.3 → 0.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +8 -17
  2. package/README.zh.md +8 -17
  3. package/bin/people-cli_darwin_amd64 +0 -0
  4. package/bin/people-cli_darwin_arm64 +0 -0
  5. package/bin/people-cli_linux_amd64 +0 -0
  6. package/bin/people-cli_linux_arm64 +0 -0
  7. package/bin/people-cli_windows_amd64.exe +0 -0
  8. package/bin/people-cli_windows_arm64.exe +0 -0
  9. package/package.json +4 -1
  10. package/skills/people-attendance/SKILL.md +0 -667
  11. package/skills/people-attendance/references/people-attendance-submission.md +0 -426
  12. package/skills/people-attendance/scripts/resolve_date.py +0 -894
  13. package/skills/people-hire/SKILL.md +0 -255
  14. package/skills/people-hire/references/people-hire-application.md +0 -334
  15. package/skills/people-hire/references/people-hire-evaluation-task-list.md +0 -233
  16. package/skills/people-hire/references/people-hire-evaluation.md +0 -127
  17. package/skills/people-hire/references/people-hire-interview-record.md +0 -109
  18. package/skills/people-hire/references/people-hire-interview-task-list.md +0 -250
  19. package/skills/people-hire/references/people-hire-interview.md +0 -146
  20. package/skills/people-hire/references/people-hire-job-process.md +0 -93
  21. package/skills/people-hire/references/people-hire-job-requirement.md +0 -227
  22. package/skills/people-hire/references/people-hire-job.md +0 -277
  23. package/skills/people-hire/references/people-hire-minutes.md +0 -91
  24. package/skills/people-hire/references/people-hire-talent.md +0 -105
  25. package/skills/people-hire/references/people-hire-test.md +0 -197
  26. package/skills/people-overtime/SKILL.md +0 -992
  27. package/skills/people-overtime/references/people-attendance-overtime-apply.md +0 -491
  28. package/skills/people-overtime/references/people-attendance-overtime.md +0 -51
  29. package/skills/people-overtime/references/people-attendance-submission.md +0 -203
  30. package/skills/people-overtime/scripts/resolve_date.py +0 -894
@@ -1,334 +0,0 @@
1
- # application
2
-
3
- ## 这是"查投递信息"场景的核心模块,覆盖投递列表、单条投递详情和增强投递详情。
4
-
5
- > **前置条件:** 先阅读 [`../../people-shared/SKILL.md`](../../people-shared/SKILL.md)
6
- > **字段来源:** 本文中的输入输出字段以 `people-cli schema hire.application.get`、`people-cli schema hire.application.list`、`people-cli schema hire.application.detail` 暴露的结构为准。
7
- > **Shortcut 约束:** 查询投递列表必须使用 `people-cli hire +application-list`。未指定流程类型时同时查询社招和校招并合并当前页结果,且分别提示社招/校招是否还有更多数据;用户明确指定社招/校招时使用 `--process-type social|campus` 并只查指定流程;高级参数 `--job-process-id` 会覆盖流程解析。原生 `application.list` 仅作为 Shortcut 底层输入,禁止直接调用或展示原生 ID 列表。
8
-
9
- ## 适用意图
10
-
11
- 当用户出现以下表达时,优先使用本场景:
12
-
13
- - "查这条投递的信息"
14
- - "看 application_id 对应的流程状态"
15
- - "看职位下候选人进展 / 投递列表"
16
- - "看多个职位下候选人的投递进展"
17
- - "看某职位被终止 / 被锁定的候选人"
18
- - "查候选人锁定在其他职位 / 被别的职位锁定 / 没法推进"
19
- - "根据投递 ID 追踪后续面试评估"
20
- - "获取投递关联的职位、人才、面试、评估信息"
21
-
22
- ### 意图和命令索引
23
-
24
- | 用途 / 何时使用 | 命令 | 说明 |
25
- | --- | --- | --- |
26
- | 按条件查询投递列表 | `people-cli hire +application-list` | 封装 `job-process.list` + `application.list` + `application.get`,未指定流程时同时查询社招和校招,把流程类型解析为底层 `process_id`,再把投递 ID 补查为投递信息 |
27
- | 查询职位下终止投递 | `people-cli hire +application-list --job-id <job_id> --terminated` | `--terminated` 下推为非活跃投递筛选,避免拉全量后按阶段过滤 |
28
- | 查询职位下锁定在其他职位的投递 | `people-cli hire +application-list --job-id <job_id> --locked` | `--locked` 下推为 `lock_status=2`,表示锁定在其他职位 / 无法推进 |
29
- | 查询某候选人在我负责职位下的投递 | `people-cli hire +application-list --keyword <候选人> --mine` | 先按候选人关键词收窄投递,再按投递关联职位的招聘负责人过滤当前用户 |
30
- | 按 `application_id` 获取轻量投递详情 | `people-cli hire application get` | 返回 `application` 对象,可带职位信息 |
31
- | 按 `application_id` 获取增强投递详情 | `people-cli hire application detail` | 返回 `application_detail`,可包含职位、人才、评估、面试等关联信息 |
32
-
33
- ### 常见问法示例
34
-
35
- - "查这条投递的详情"
36
- - "这个 `application_id` 现在在哪个阶段"
37
- - "这次投递对应的职位和候选人是谁"
38
- - "看这个职位下候选人的进展"
39
- - "查投递关联的面试和评估信息"
40
-
41
- ### 投递查询调用流程
42
-
43
- 1. **判断列表还是详情**
44
- - 用户要"职位下候选人进展 / 投递列表 / 多条投递"时,必须走 `+application-list`。
45
- - 投递列表未指定社招/校招时不需要追问,直接使用 `+application-list`;Shortcut 同时查询社招和校招,并合并当前页结果。
46
- - 用户明确说社招用 `--process-type social`,用户明确说校招用 `--process-type campus`,此时只查指定流程。
47
- - 用户给出 `application_id` 且只要当前阶段、来源、职位等轻量信息时,走 `application.get`。
48
- - 用户给出 `application_id` 且需要投递关联实体(职位、人才、评估、面试等)时,走 `application.detail`。
49
- 2. **执行前先查 schema**
50
- - 使用 `+application-list` 时无需先查 schema,按本文 Shortcut 参数执行。
51
- - 使用原生 `application.get` / `application.detail` 前执行对应 schema。
52
- - 禁止直接调用原生 `application.list`;自定义字段需求使用 `--fields`,完整结构需求使用 `+application-list --view full`。
53
- 3. **执行查询**
54
- - 列表:`people-cli hire +application-list --page-size 5 ...`
55
- - 用户同时给出候选人姓名/电话/邮箱等关键词和"我负责的职位下"时,执行 `people-cli hire +application-list --keyword <候选人> --mine --fields candidate,job,stage,application_time --limit 20`。不要先 `+job-list --mine` 拉当前用户负责的职位后再按职位逐个查询投递。
56
- - 已知多个职位时,重复传 `--job-id`;查询终止投递用 `--terminated`;查询"锁定在其他职位 / 被别的职位锁定 / 无法推进"用 `--locked`;查询"锁定在当前职位"用 `--lock-status 3`;不要先拉全量再按模型上下文过滤。
57
- - 用户说"我的部门 / 我的团队 / 我们部门 / 我们团队 / 本部门投递、候选人投递情况"时,执行 `people-cli hire +application-list --my-department --page-size 5` 或 `people-cli hire +application-list --my-team --page-size 5`;Shortcut 内部会调用 `POST /open-apis/corehr/v2/employees/query_basic_info` 获取 `data.item.department_id` 后按职位部门 ID 过滤,`department_id_type` 跟随 `--department-id-type`,未指定时默认 `open_department_id`。
58
- - 轻量详情:`people-cli hire application get --params '{"application_id":"<application_id>", ...}'`
59
- - 增强详情:`people-cli hire application detail --params '{"application_id":"<application_id>", ...}'`
60
- - `application_id` 在接口 schema 中位于 path,但在 CLI 调用时统一通过 `--params` 传入。
61
- 4. **按业务链路输出**
62
- - 列表查询默认只输出当前页摘要;CLI/Shortcut 输出的 `page_token` 供 skill/agent 内部继续翻页,最终回复用户时只提示"还有更多数据",不要展示 `page_token`。
63
- - 列表查询如需按返回字段过滤、判断是否存在、计数或聚合,使用 `+application-list` 的 `--where` / `--mode` / `--limit` / `--scan-page-limit`;不要直接调用原生 `application.list`,也不要手动循环 `page_token` 后在模型上下文中过滤。
64
- - `--fields` / `--where` 优先使用稳定别名,不要手写 `application.xxx`、`talent.xxx`、`job.xxx` 这类嵌套 jq 路径;CLI 兼容 `id`、`name`、`talent_name`、`position_name`、`current_stage`、`terminate_reason` 等模型常见写法,但生成命令时仍优先写 `application_id`、`candidate`、`job`、`stage`、`termination_reason`。
65
- - 未指定 `--process-type` 时,`--page-size` 控制默认返回规模,`--scan-page-limit` 分别作用于社招和校招两条分页链;触发 `--where` / `--mode` / 较大 `--limit` 时,Shortcut 会自动把底层源接口 `page_size` 调到上限后合并、裁剪或聚合。
66
- - 详情查询先给出投递状态、阶段、职位、人才等主链路字段。
67
- - 用户要求终止原因、来源明细、评估、面试等再展开。
68
-
69
- ### 不要误走
70
-
71
- - 用户要的是"某次投递对应的面试记录"时,不要停留在 `application.get`,应继续走 `interview.list`。
72
- - 用户要的是"我的待办任务"时,不要把投递接口当作任务接口,应改走 `+interview-task-list` 或 `+evaluation-task-list`。
73
- - 用户要的是"投递列表"时,不要直接返回原生 `application.list` 的 ID 列表,必须使用 `+application-list` 补查投递信息。
74
- - 用户只提供职位名、候选人名但没有足够筛选条件时,不要编造 `application_id`;先用可下推字段查询列表,或要求用户补充条件。
75
-
76
- ## 标准输入
77
-
78
- ### `+application-list`
79
-
80
- Shortcut 参数来自 `application.list` query,并额外封装 `job-process.list` 与逐条 `application.get`:
81
-
82
- > `+application-list` 默认 `--as user`;只有用户明确指定 `--as bot` 时才使用 bot 身份。
83
-
84
- | 参数 | 对应接口字段 | 类型 | 说明 |
85
- | --- | --- | --- | --- |
86
- | `--process-type` | - | string | 社招/校招流程类型,支持 `social`/`社招`、`campus`/`校招`;未传时同时查询社招和校招 |
87
- | `--job-process-id` | `process_id` | string | 高级覆盖参数;传入后跳过 `job-process.list` 流程解析 |
88
- | `--stage-id` | `stage_id` | string | 按阶段过滤 |
89
- | `--talent-id` | `talent_id` | string | 按人才过滤 |
90
- | `--job-id` | `job_id` | repeatable string | 职位 ID;可重复传入以受控查询多个职位 |
91
- | `--keyword` | `keyword` | string | 关键字过滤,可用于候选人姓名、电话、邮箱、公司、任职职位、学校等 |
92
- | `--user-id-type` | query | enum | 当前用户 ID 类型,默认 `open_id`;用于 `--mine` 解析当前用户 |
93
- | `--recruiter-id` | internal filter | repeatable string | 投递关联职位招聘负责人 ID 过滤 |
94
- | `--mine` | internal filter | bool | 查询"我负责的职位下的投递"时使用;Shortcut 内部获取当前用户 `data.open_id` 后按投递关联职位招聘负责人过滤 |
95
- | `--department` | internal filter | string | 投递关联职位部门包含过滤 |
96
- | `--department-id` | internal filter | string | 投递关联职位部门 ID 过滤,ID 类型跟随 `--department-id-type`,未指定时默认 `open_department_id`;支持 `self` / `current` 表示当前用户部门 |
97
- | `--department-id-type` | query | enum | `open_department_id` / `department_id`;使用 `--department-id` / `--my-department` / `--my-team` 时未显式指定则默认 `open_department_id` |
98
- | `--my-department` | internal | bool | 查询"我的部门/我们部门投递"时使用;Shortcut 内部获取当前用户 `data.item.department_id` 后过滤 |
99
- | `--my-team` | internal | bool | 查询"我的团队/我们团队投递"时使用;等价于 `--my-department`,Shortcut 内部获取当前用户 `data.item.department_id` 后过滤 |
100
- | `--stage` | internal filter | string | 投递阶段名称包含过滤 |
101
- | `--source` | internal filter | string | 投递来源/简历来源包含过滤,默认不展示,需要展示时用 `--fields source` |
102
- | `--job-category` | internal filter | string | 投递关联职位序列/职能方向包含过滤 |
103
- | `--recruitment-type` | internal filter | string | 投递关联职位招聘类型/雇佣类型包含过滤 |
104
- | `--active-status` | `active_status` | string | 活跃状态:`1`/`active` 活跃投递,`2`/`terminated` 非活跃投递,`3`/`all` 全部 |
105
- | `--terminated` | `active_status=2` | bool | 查询已终止/非活跃投递的快捷参数 |
106
- | `--lock-status` | `lock_status` | repeatable string | 锁定状态,支持 `1`/`未锁定`、`2`/`锁定在其他职位`、`3`/`锁定在当前职位` |
107
- | `--locked` | `lock_status=2` | bool | 查询锁定在其他职位、被别的职位锁定、无法推进的快捷参数 |
108
- | `--start-time` | internal filter | string | 最早投递时间,支持毫秒时间戳或日期/相对时间字符串 |
109
- | `--end-time` | internal filter | string | 最晚投递时间,支持毫秒时间戳或日期/相对时间字符串 |
110
- | `--month` | internal filter | string | 投递月份,支持 `YYYY-MM`、`本月`/`current`、`上月`/`last` |
111
- | `--page-token` | `page_token` | string | 翻页 token |
112
- | `--page-size` | `page_size` | int | 默认 `5`,最大 `100`;未指定 `--process-type` 时作用于每个流程 |
113
- | `--update-start-time` | `update_start_time` | string | 最早更新时间,支持毫秒时间戳或日期/相对时间字符串 |
114
- | `--update-end-time` | `update_end_time` | string | 最晚更新时间,支持毫秒时间戳或日期/相对时间字符串 |
115
- | `--view` | - | enum | `summary` 默认裁剪视图;`full` 原始字段视图 |
116
- | `--fields` | - | string | 逗号分隔字段名,如 `application_id,candidate,job,stage` |
117
- | `--where` | - | string | 查询后过滤表达式,如 `job contains 测试; stage contains 面试` |
118
- | `--limit` | - | int | 最多返回的匹配行数;未指定流程时默认等于 `--page-size * 流程数` |
119
- | `--scan-page-limit` | - | int | 查询后过滤每个流程最多扫描源页数,默认由 Shortcut 控制 |
120
- | `--mode` | - | enum | `list` / `exists` / `count` / `aggregate` |
121
- | `--group-by` | - | string | `--mode aggregate` 时按哪个字段聚合,如 `stage`;支持逗号分隔多个字段,如 `job_category,termination_reason` |
122
-
123
- > `--where` 多条件优先使用分号分隔,如 `job contains 测试; stage contains 面试`;CLI 兼容英文 `AND`,但不支持 `OR`。投递来源使用 `--source` 或稳定别名 `source` / `channel` / `resume_source`,投递阶段使用 `--stage` 或稳定别名 `stage` / `current_stage`。
124
- > 需要按两个维度统计时直接使用单条命令的多字段聚合,例如 `+application-list --terminated --mode aggregate --group-by job_category,termination_reason`,不要拆成多次聚合后再在模型上下文里合并。
125
-
126
- ### 底层 `application.list` 字段参考
127
-
128
- 以下字段来自 `application.list` query,仅供理解 `+application-list` 的底层过滤能力;查询投递列表时禁止直接调用原生命令:
129
-
130
- | 字段 | 位置 | 类型 | 说明 |
131
- | --- | --- | --- | --- |
132
- | `process_id` | query | string | 招聘流程 ID,必填;通过 `job-process.list` 获取 |
133
- | `stage_id` | query | string | 按阶段过滤 |
134
- | `talent_id` | query | string | 按人才过滤 |
135
- | `active_status` | query | string | 活跃状态:`1` 活跃投递,`2` 非活跃投递,`3` 全部 |
136
- | `job_id` | query | string | 职位 ID |
137
- | `keyword` | query | string | 关键字过滤,可用于候选人姓名、电话、邮箱、公司、任职职位、学校等 |
138
- | `lock_status` | query | list | 锁定状态:`1` 未锁定,`2` 锁定在其他职位,`3` 锁定在当前职位 |
139
- | `page_token` | query | string | 翻页 token |
140
- | `page_size` | query | int | skill 默认 `5`,schema 上限以当前 CLI 为准 |
141
- | `update_start_time` | query | string | 最早更新时间,支持毫秒时间戳或日期/相对时间字符串 |
142
- | `update_end_time` | query | string | 最晚更新时间,支持毫秒时间戳或日期/相对时间字符串 |
143
-
144
- ### `application.get`
145
-
146
- 以下字段来自 `application.get`:
147
-
148
- > 接口 schema 中的字段位置反映 OpenAPI 定义;在 `people-cli` 实际调用时,以下字段统一通过 `--params` 传入。
149
-
150
- | 字段 | 位置 | 类型 | 说明 |
151
- | --- | --- | --- | --- |
152
- | `application_id` | path | string | 投递 ID,必填 |
153
- | `user_id_type` | query | string | 用户 ID 类型 |
154
- | `options` | query | list | 请求控制参数(如 `with_job`) |
155
-
156
- ### `application.detail`
157
-
158
- 以下字段来自 `application.detail`:
159
-
160
- > 接口 schema 中的字段位置反映 OpenAPI 定义;在 `people-cli` 实际调用时,以下字段统一通过 `--params` 传入。
161
-
162
- | 字段 | 位置 | 类型 | 说明 |
163
- | --- | --- | --- | --- |
164
- | `application_id` | path | string | 投递 ID,必填 |
165
- | `user_id_type` | query | string | 用户 ID 类型 |
166
- | `department_id_type` | query | string | 部门 ID 类型;`+application-list` 补查投递时跟随 `--department-id-type`,未指定时默认 `open_department_id` |
167
- | `job_level_id_type` | query | string | 职级 ID 类型 |
168
- | `job_family_id_type` | query | string | 序列 ID 类型 |
169
- | `employee_type_id_type` | query | string | 人员类型 ID 类型 |
170
- | `options` | query | list | 控制返回哪些关联实体信息 |
171
-
172
- ## 标准输出
173
-
174
- ### `+application-list`
175
-
176
- Shortcut 默认以紧凑表格输出摘要字段,并保留后续下钻需要的内部 ID,避免返回内容过多造成上下文压力:
177
-
178
- | 字段 | 说明 |
179
- | --- | --- |
180
- | `Application ID` | 投递 ID,供后续 `application get/detail`、`+interview-list`、`+evaluation-list` 等内部调用使用;回复用户时默认不展示 |
181
- | `Candidate Name` | 候选人姓名;有 `Talent ID` 时 Shortcut summary 会渲染为招聘系统 Markdown 链接,有 `Application ID` 时链接携带 `application_id` |
182
- | `Talent ID` | 人才 ID,供后续 `+talent-detail` 或候选人链接构造使用;回复用户时默认不展示 |
183
- | `Job ID` | 职位 ID,供后续 `+job-detail` 使用;回复用户时默认不展示 |
184
- | `Job Name` | 职位名称 |
185
- | `Department ID` | 职位部门 ID,供 `--department-id` / `--my-department` / `--my-team` 内部过滤使用;回复用户时默认不展示 |
186
- | `Application Time` | 投递时间 |
187
- | `Stage ID` | 投递阶段 ID,供后续阶段相关过滤或下钻使用;回复用户时默认不展示 |
188
- | `Application Stage` | 投递阶段 |
189
- | `Active Status` | 活跃/终止状态;可用稳定别名 `active_status` 做 `--where`/`--group-by`,默认不展示 |
190
- | `Source` | 投递来源/简历来源;可用稳定别名 `source`/`channel`/`resume_source` 做过滤或显式展示,默认不展示 |
191
- | `Termination Type` | 终止类型;可用稳定别名 `termination_type` 做过滤或聚合,默认不展示 |
192
- | `Termination Reason` | 终止原因;可用稳定别名 `termination_reason` 做过滤或聚合,默认不展示 |
193
- | `Termination Note` | 终止备注;可用稳定别名 `termination_note` 做过滤,默认不展示 |
194
- | `Lock Status` | 锁定状态;枚举 `1` 未锁定、`2` 锁定在其他职位、`3` 锁定在当前职位;可用稳定别名 `lock_status` / `locked` 做过滤,默认不展示,显式需要时用 `--fields candidate,job,stage,lock_status` |
195
-
196
- 传 `--view full` 时输出完整 `Application` 与 `Talent` 补查结果,用于排障或深挖详情。无论是否裁剪,Shortcut 返回中都应保留必要 ID;最终回复用户时遵守主 skill 的"默认不向用户展示 ID 类字段"规则。整理候选人表格时保留 `Candidate Name` 的 Markdown 链接,不要改回纯文本姓名。
197
-
198
- > 默认字段裁剪后仍保留后续调用需要的 `Application ID`、`Talent ID`、`Job ID`、`Stage ID`。这些 ID 可以被 skill/agent 内部继续传给面试、评估、笔试等 Shortcut,但最终回复用户时默认不展示。
199
-
200
- ### 底层 `application.list`
201
-
202
- 接口返回投递 ID 列表和分页状态。`items[]` 的精确字段以当前 `people-cli schema hire.application.list` 为准;原生结果仅作为 `+application-list` 的底层输入,禁止直接调用或展示给用户。底层查询必须携带 `process_id`。
203
-
204
- 分页状态字段(CLI/Shortcut 需要输出给 skill/agent 内部判断和续查,默认不对用户展示 `page_token`):
205
-
206
- | 字段 | 类型 | 说明 |
207
- | --- | --- | --- |
208
- | `has_more` | bool | 是否有下一页 |
209
- | `page_token` | string | 内部翻页 token,CLI 可见,最终回复用户时默认隐藏 |
210
-
211
- > 未指定 `--process-type` 时,社招和校招分页 token 相互独立。Shortcut 会分别提示 `Social has more` / `Campus has more`;继续翻页时必须按提示带上对应 `--process-type social|campus` 和 `--page-token`,不要把某个流程的 token 用到另一个流程。
212
-
213
- ### `application.get`
214
-
215
- 接口返回 `application` 对象,优先输出以下字段:
216
-
217
- | 字段 | 类型 | 说明 |
218
- | --- | --- | --- |
219
- | `application.id` | string | 投递 ID,默认不展示 |
220
- | `application.job_id` | string | 职位 ID,默认不展示 |
221
- | `application.talent_id` | string | 人才 ID,默认不展示 |
222
- | `application.active_status` | int | 活跃状态 |
223
- | `application.delivery_type` | int | 投递方式 |
224
- | `application.stage` | object | 当前投递阶段 |
225
- | `application.stage_time_list` | array | 阶段变更时间线 |
226
- | `application.resume_source_info` | object | 投递来源 |
227
- | `application.termination_type` | int | 终止原因类型 |
228
- | `application.termination_reason_list` | array | 终止原因列表 |
229
- | `application.creator_id` | string | 投递创建人 |
230
- | `application.job_info` | object | 投递职位信息(需按 schema 开启) |
231
-
232
- ### `application.detail`
233
-
234
- 接口返回 `application_detail` 对象,按需展开以下结构:
235
-
236
- | 字段 | 类型 | 说明 |
237
- | --- | --- | --- |
238
- | `application_detail.basic_info` | object | 投递基本信息 |
239
- | `application_detail.job` | object | 投递职位信息 |
240
- | `application_detail.talent` | object | 投递人才信息 |
241
- | `application_detail.evaluations` | array | 投递评估信息 |
242
- | `application_detail.interview_aggregation` | object | 投递面试信息 |
243
-
244
- ## 所需权限
245
-
246
- | 方法 | Scope |
247
- | --- | --- |
248
- | `application.list` | `hire:people_cli` / `corehr:people_cli`(使用 `--my-department` / `--my-team` 时需要) |
249
- | `application.get` | `hire:people_cli` |
250
- | `application.detail` | `hire:people_cli` |
251
-
252
- ## 示例
253
-
254
- ```bash
255
- # 查看详情接口 schema
256
- people-cli schema hire.application.get
257
- people-cli schema hire.application.detail
258
-
259
- # 查询投递列表,并自动补查投递信息
260
- people-cli hire +application-list \
261
- --job-id 7334134355464633 \
262
- --keyword 张三 \
263
- --page-size 5
264
-
265
- # 查询某候选人在我负责职位下的投递,先 keyword 收窄再按职位负责人过滤
266
- people-cli hire +application-list \
267
- --keyword 蒋零零 \
268
- --mine \
269
- --fields candidate,job,stage,application_time \
270
- --limit 20
271
-
272
- # 查询我的部门投递摘要
273
- people-cli hire +application-list \
274
- --my-department \
275
- --fields candidate,job,stage,application_time \
276
- --limit 5
277
-
278
- # 查看某职位各阶段投递数量,Shortcut 会自动解析社招/校招流程并受控扫描
279
- people-cli hire +application-list \
280
- --job-id 7334134355464633 \
281
- --mode aggregate \
282
- --group-by stage \
283
- --scan-page-limit 10
284
-
285
- # 按来源、阶段、部门和投递月份过滤,来源需要展示时显式 --fields source
286
- people-cli hire +application-list \
287
- --source 内推 \
288
- --stage 面试 \
289
- --department Brand \
290
- --month 本月 \
291
- --fields candidate,job,stage,source \
292
- --limit 5
293
-
294
- # 查某职位已终止候选人摘要
295
- people-cli hire +application-list \
296
- --job-id 7334134355464633 \
297
- --terminated \
298
- --limit 5
299
-
300
- # 查多个职位下锁定在其他职位、无法继续推进的投递
301
- people-cli hire +application-list \
302
- --job-id 7334134355464633 \
303
- --job-id 7334134355464999 \
304
- --locked \
305
- --fields candidate,job,stage,lock_status \
306
- --limit 5
307
-
308
- # 查锁定在当前职位的投递
309
- people-cli hire +application-list \
310
- --job-id 7334134355464633 \
311
- --lock-status 3 \
312
- --fields candidate,job,stage,lock_status \
313
- --limit 5
314
-
315
- # 聚合近一个月负责职位下被终止候选人的 top 终止原因
316
- people-cli hire +application-list \
317
- --job-id 7334134355464633 \
318
- --terminated \
319
- --mode aggregate \
320
- --group-by termination_reason \
321
- --scan-page-limit 10
322
-
323
- # 查询轻量投递详情
324
- people-cli hire application get --params '{"application_id":"7046315599510833452","user_id_type":"open_id"}'
325
-
326
- # 查询增强投递详情
327
- people-cli hire application detail --params '{"application_id":"7046315599510833452","user_id_type":"open_id","options":["with_job","with_talent","with_interview","with_evaluation"]}'
328
- ```
329
-
330
- ## 选路提醒
331
-
332
- - 没有 `application_id` 时不要直接调 `application.get` 或 `application.detail`。
333
- - 用户要多条投递时必须使用 `+application-list`,再按需要追查单条详情。
334
- - `application.detail` 返回更重;用户只要当前阶段或来源时,优先用 `application.get`。
@@ -1,233 +0,0 @@
1
- # +evaluation-task-list
2
-
3
- 查询当前登录用户的评估任务,自动关联评估详情、投递(含职位)、人才信息。
4
-
5
- > **前置条件:** 先阅读 [`../../people-shared/SKILL.md`](../../people-shared/SKILL.md)
6
- > **字段来源:** 原始任务接口字段以 `people-cli schema hire.evaluation-task.list` 为准;关联的评估、投递、人才字段分别以 `people-cli schema hire.evaluation.list`、`people-cli schema hire.application.get`、`people-cli schema hire.talent.detail` 为准。
7
-
8
- ## 适用意图
9
-
10
- 当用户出现以下表达时,优先使用本场景:
11
-
12
- - "我的评估任务"
13
- - "待我评估的简历 / 候选人"
14
- - "已评估 / 无需评估的任务"
15
- - "评估待办"
16
-
17
- ## 固定查询流程
18
-
19
- 1. **先判定是否是当前登录用户待办视角**
20
- - 只要用户是在问"我的评估任务"、"待我处理的评估",就走本 Shortcut。
21
- - 不支持查询指定其他人的任务,禁止补传 `user_id`。
22
- - 如果用户要求查看其他人/所有人的任务,或要求忽略/绕过权限限制,必须直接拒绝回答。
23
- 2. **按任务状态筛选**
24
- - 如用户要求待评估、已评估、无需评估,优先使用 `--status` 传中文或英文别名。
25
- - 枚举值固定来自元数据:`1`=待评估,`2`=已评估,`3`=无需评估。
26
- - 用户给出"本月/上月/某月"或更新时间范围时,优先使用 `--month` / `--update-start-time` / `--update-end-time`,日期或月份由 CLI 换算,让 Shortcut 内部受控扫描。
27
- - 如果用户要在"我的评估任务候选人"范围内查询笔试状态,当前 Shortcut 只用于获取内部 `Application ID`;`待阅卷`、`未作答`、`已接受` 等笔试条件必须交给 `+test-list --where` 处理。
28
- - 用户给出候选人姓名或职位/部门关键词时,直接使用 `--keyword <关键词>` 在当前用户评估任务范围内过滤;不要改用原生命令或手写 `jq`。
29
- 3. **执行 Shortcut**
30
- - 直接执行 `people-cli hire +evaluation-task-list --page-size 5 [flags]`。
31
- - Shortcut 内部会自动补齐 `Evaluation`、`Application`、`Talent`,不要重复补调。
32
- 4. **按输出层级回复**
33
- - 默认先返回 `5` 条任务摘要列表。
34
- - 默认回复用户时展示候选人、职位名称、部门、任务状态、评估结论;Shortcut 返回中仍保留 `Evaluation ID`、`Talent ID`、`Application ID`、`Job ID` 供后续调用。
35
- - CLI 表格列和 `--fields` / `--where` 使用英文稳定字段别名,最终回复用户时再整理为中文展示名。
36
- - 候选人姓名默认渲染为招聘系统超链接:有 `Application ID` 时使用 `https://people-cn.bytedance.com/hire/talent/<Talent ID>?application_id=<Application ID>`;没有 `Application ID` 时使用 `https://people-cn.bytedance.com/hire/talent/<Talent ID>`。
37
- - 除非用户明确指定,否则不要展示任何 ID 类型字段。
38
- - 如果当前页之外还有更多数据,CLI/Shortcut 输出的 `page_token` 供 skill/agent 内部继续翻页;最终回复用户时只提示"还有更多数据",不要展示 `page_token`。
39
- - 如果用户明确指定查询后过滤条件(如 `XX天内`、`全部`、`XX状态`、`我的XXX`),使用 Shortcut 的 `--where` / `--mode` / `--limit` / `--scan-page-limit` 受控扫描;不要手动循环 `page_token`。
40
- - 不要在本 Shortcut 上过滤 `test_status` / `reply_status`;这些不是评估任务字段。需要笔试状态时,先保留 `application_id` 供 `+test-list --application-id` 使用。
41
- - 当前不要承诺返回人才经历、标签、联系方式等未返回字段。
42
- - 用户明确要求完整结构时,优先使用 `--view full`(兼容旧参数 `--no-trim`)。
43
- - 用户只要少数字段时,使用 `--fields` 精确提取,禁止为了字段裁剪手写 `--jq`。
44
-
45
- ## 用法
46
-
47
- ```bash
48
- people-cli hire +evaluation-task-list [flags]
49
- ```
50
-
51
- ## 参数
52
-
53
- | Flag | 类型 | 必填 | 默认值 | 说明 |
54
- |------|------|------|--------|------|
55
- | `--activity-status` | int | 否 | - | 任务状态筛选:`1`=待评估,`2`=已评估,`3`=无需评估 |
56
- | `--status` | string | 否 | - | 任务状态别名:`待评估`、`已评估`、`无需评估`;与 `--activity-status` 冲突时会报错 |
57
- | `--update-start-time` | string | 否 | - | 最早评估更新时间,支持毫秒时间戳或日期字符串;Shortcut 内部受控扫描 |
58
- | `--update-end-time` | string | 否 | - | 最晚评估更新时间,支持毫秒时间戳或日期字符串;Shortcut 内部受控扫描 |
59
- | `--time-from` / `--start-time` / `--start-date` | string | 否 | - | `--update-start-time` 别名 |
60
- | `--time-to` / `--end-time` / `--end-date` | string | 否 | - | `--update-end-time` 别名 |
61
- | `--month` | string | 否 | - | 评估更新时间月份,支持 `YYYY-MM`、`本月`/`current`、`上月`/`last` |
62
- | `--keyword` | string | 否 | - | 在当前用户评估任务范围内按候选人、职位、部门、阶段等关键词过滤 |
63
- | `--page-size` | int | 否 | `5` | skill 默认分页大小(最大 20) |
64
- | `--page-token` | string | 否 | - | 分页 token,首次查询不传 |
65
- | `--view` | enum | 否 | `summary` | 输出视图:`summary` 裁剪视图,`full` 原始字段视图 |
66
- | `--fields` | string | 否 | - | 逗号分隔字段名,如 `evaluation_id,application,talent` |
67
- | `--where` | string | 否 | - | 查询后过滤表达式,如 `department contains Brand` |
68
- | `--limit` | int | 否 | - | 最多返回的匹配行数,默认等于 `--page-size` |
69
- | `--scan-page-limit` | int | 否 | - | 查询后过滤最多扫描源页数 |
70
- | `--mode` | enum | 否 | `list` | `list` / `exists` / `count` / `aggregate` |
71
- | `--group-by` | string | 否 | - | `--mode aggregate` 时按哪个字段聚合 |
72
- | `--no-trim` | bool | 否 | `false` | 禁用输出裁剪,返回 API 原始完整数据 |
73
-
74
- ### 说明
75
-
76
- - 该命令**无需传入 user_id**,默认查询当前登录用户的评估任务。
77
- - 自动关联查询以下信息,**无需再单独调用对应 API**:
78
- - **Evaluation**:评估详情(通过 `evaluation.list` + application_id 查询)
79
- - **Application**:投递详情(通过 `application.get` + `with_job` option 查询,同时返回职位信息)
80
- - **Talent**:人才详情(通过 `talent.detail` 查询)
81
-
82
- ## 标准输入
83
-
84
- 以下输入字段由 `people-cli schema hire.evaluation-task.list` 与当前 Shortcut flag 固定:
85
-
86
- | 输入项 | 来源 | 类型 | 说明 |
87
- |------|------|------|------|
88
- | `activity_status` | `evaluation-task.list` query / `--activity-status` | int | 任务状态,`1/2/3` |
89
- | `status` | Shortcut 扩展 / `--status` | string | 任务状态中文或英文别名,会映射为 `activity_status` |
90
- | `update-start-time` / `update-end-time` / `time-from` / `time-to` / `start-time` / `end-time` / `start-date` / `end-date` / `month` | Shortcut 扩展 | string | 评估更新时间相关受控过滤;时间由 CLI 换算 |
91
- | `keyword` | Shortcut 扩展 | string | 当前用户任务范围内的候选人、职位、部门、阶段关键词过滤 |
92
- | `page_size` | `evaluation-task.list` query / `--page-size` | int | skill 默认 `5`,最大 `20` |
93
- | `page_token` | `evaluation-task.list` query / `--page-token` | string | 翻页 token |
94
- | `view` | Shortcut 扩展 / `--view` | enum | `summary` / `full` |
95
- | `fields` | Shortcut 扩展 / `--fields` | string | 逗号分隔输出字段 |
96
- | `where` / `mode` / `limit` / `scan-page-limit` / `group-by` | Shortcut 扩展 | string/int | 查询后过滤、计数和聚合控制 |
97
- | `no-trim` | Shortcut 扩展 | bool | 是否返回完整未裁剪结构 |
98
-
99
- > `evaluation-task.list` 原始接口包含 `user_id`、`user_id_type`,但本 Shortcut 已固定为"当前登录用户任务查询",调用时禁止传入。
100
- > 时间 flag 支持毫秒时间戳、`YYYY-MM`、`YYYY-MM-DD`、`YYYY-MM-DD HH:mm[:ss]`、`近/最近 N 天/周/月/季度/年`、`今天/today`、`昨天/yesterday`、`本月/current`、`上月/last`;不要让模型自行计算毫秒。
101
-
102
- ## 标准输出
103
-
104
- 本场景输出分两层:
105
-
106
- 1. **内部关联字段层**:来自 `evaluation-task.list`
107
- 2. **自动补齐层**:来自 `evaluation.list`、`application.get`、`talent.detail`
108
-
109
- 内部关联字段默认只供链接构造、后续查询和状态映射使用,不直接展示给用户:
110
-
111
- | 字段 | 来源 | 类型 | 说明 |
112
- |------|------|------|------|
113
- | `Evaluation ID` | `evaluation-task.list.items[].id` | string | 评估 ID |
114
- | `Job ID` | `evaluation-task.list.items[].job_id` | string | 职位 ID |
115
- | `Talent ID` | `evaluation-task.list.items[].talent_id` | string | 人才 ID |
116
- | `Application ID` | `evaluation-task.list.items[].application_id` | string | 投递 ID |
117
- | `Activity Status` | `evaluation-task.list.items[].activity_status` | int | 任务状态。枚举:1=待评估, 2=已评估, 3=无需评估 |
118
-
119
- ## 所需权限
120
-
121
- | Scope |
122
- |-------|
123
- | `hire:people_cli` |
124
-
125
- ## 默认回复与字段别名
126
-
127
- ### 默认展示字段
128
-
129
- 默认回复应优先整理为列表,字段固定如下:
130
-
131
- | 用户回复字段 | CLI 字段 / 稳定别名 | 说明 |
132
- |------|------|------|
133
- | 候选人 | `Candidate Name` / `Talent.basic_info.name` / `candidate` | 候选人姓名;优先使用 Shortcut summary 的 `Candidate Name`,有 `Talent ID` 时已渲染为招聘系统链接 |
134
- | 职位名称 | `Application.job.name` / `job` / `job_name` | 投递职位名称 |
135
- | 部门 | `Application.job.department.name` / `department` | 部门名称,通常取 `zh_cn` |
136
- | 任务状态 | `Activity Status` / `activity_status` | 评估任务状态 |
137
- | 评估结论 | `Evaluation.conclusion` / `conclusion` | 评估结论 |
138
-
139
- > Shortcut 默认保留 `Evaluation ID`、`Job ID`、`Talent ID`、`Application ID` 作为内部关联字段,但除非用户明确指定,不要在回复中直接展示这些 ID。若用户要求完整嵌套结构,使用 `--view full`。
140
- > 自行分组或重排评估任务表格时,必须让候选人名保留 `Candidate Name` 的 Markdown 链接;不要在最终回复里展示 ID 列。
141
-
142
- ### 补齐对象与字段别名
143
-
144
- Shortcut 会自动补齐 `Evaluation`、`Application`、`Talent` 三个对象。默认摘要只保留关键字段;完整结构使用 `--view full`。
145
-
146
- | 对象 / 别名 | 默认含义 |
147
- |------|------|
148
- | `Evaluation` / `evaluation` | 评估详情,默认含 `evaluator_id`、`conclusion`、`commit_status`、`content` |
149
- | `Application` / `application` | 投递详情,默认含 `active_status`、`stage`、`job` |
150
- | `Talent` / `talent` | 人才详情,默认含 `talent_id`、`basic_info.name` |
151
- | `candidate` / `candidate_name` | 候选人姓名过滤或字段选择别名 |
152
- | `job` / `job_name` | 职位名称过滤或字段选择别名 |
153
- | `department`、`stage`、`active_status` | 来自投递/职位的查询后过滤别名 |
154
- | `conclusion`、`commit_status` | 来自评估记录的查询后过滤别名 |
155
- | `search` / `keyword` | 候选人、职位、部门、阶段等摘要文本的过滤别名 |
156
-
157
- > 当前 `talent.detail` 仅保留人才 ID 与姓名;不要假设还会返回工作年限、教育经历、标签、联系方式等字段。
158
-
159
- ### 输出格式
160
-
161
- 默认使用表格输出,和其它招聘列表 Shortcut 保持一致。显式传 `--format json` 时数据被 Envelope 包装:
162
-
163
- ```json
164
- {
165
- "ok": true,
166
- "identity": "user",
167
- "data": [ ... ],
168
- "meta": { "count": N }
169
- }
170
- ```
171
-
172
- `--format table` 时嵌套对象会被扁平化为点号分隔的列显示;这是默认格式。精确字段裁剪使用 `--fields`;禁止使用 `--format csv`、`--format ndjson`、`--output`、shell 重定向或其它方式导出任务数据。
173
-
174
- ## 输出裁剪
175
-
176
- **默认行为**:自动裁剪输出,只返回关键字段,减少模型幻觉风险。裁剪后每条记录约 0.3KB(裁剪前约 3-5KB)。
177
-
178
- - 默认裁剪无需额外参数;完整结构使用 `--view full`(兼容旧参数 `--no-trim`)。
179
- - `--fields`、`--where`、`--group-by` 使用上方稳定字段别名,不要手写 jq 路径。
180
-
181
- ## 使用 --fields 精确提取
182
-
183
- 当只需要特定字段时,用 `--fields` 过滤,避免返回大量无关数据:
184
-
185
- ```bash
186
- # 5 条 + 仅提取展示字段和关联 ID
187
- people-cli hire +evaluation-task-list --page-size 5 --fields evaluation_id,job_id,talent_id,application_id,evaluation,application,talent
188
-
189
- # 只提取待评估的任务,含评估结论
190
- people-cli hire +evaluation-task-list --status 待评估 --fields evaluation_id,talent,application
191
-
192
- # 提取评估内容和结论
193
- people-cli hire +evaluation-task-list --fields talent,evaluation
194
-
195
- # 给后续笔试查询取投递 ID,ID 只作内部关联,不展示给用户
196
- people-cli hire +evaluation-task-list --fields application_id,candidate,job --limit 100 --scan-page-limit 10
197
- ```
198
-
199
- > **提示**:`--fields` 使用稳定字段别名,如 `evaluation_id`、`application_id`、`talent`、`evaluation`、`application`,不要手写 jq 路径。
200
-
201
- ## 示例
202
-
203
- ```bash
204
- # 查询当前用户评估任务摘要(默认 5 条 + 默认表格输出)
205
- people-cli hire +evaluation-task-list --page-size 5
206
-
207
- # 只查询待评估的任务
208
- people-cli hire +evaluation-task-list --status 待评估
209
-
210
- # 按候选人或职位关键词在我的评估任务中查询
211
- people-cli hire +evaluation-task-list --keyword 蒋零零 --fields application_id,talent_id,candidate,job,evaluation
212
-
213
- # 查看本月已完成的评估任务数量
214
- people-cli hire +evaluation-task-list --status 已评估 --month 本月 --mode count
215
-
216
- # 查看近两个月更新的评估任务,时间由 CLI 换算
217
- people-cli hire +evaluation-task-list --update-start-time 近两个月 --update-end-time 今天 --fields application_id,candidate,job,evaluation
218
-
219
- # 只查询已评估的任务
220
- people-cli hire +evaluation-task-list --status 已评估
221
-
222
- # 用户明确要求更多条数时再调整分页大小
223
- people-cli hire +evaluation-task-list --page-size 20
224
-
225
- # 用户明确要求继续时再翻页
226
- people-cli hire +evaluation-task-list --page-token <token>
227
-
228
- # 获取完整未裁剪数据
229
- people-cli hire +evaluation-task-list --view full
230
-
231
- # 以表格格式输出
232
- people-cli hire +evaluation-task-list --format table
233
- ```