vps-work 1.1.0 → 2.1.0
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.
- package/.well-known/skills/index.json +15 -1
- package/README.md +9 -3
- package/USAGE.md +10 -2
- package/dist/vps-work.cjs +49315 -49256
- package/package.json +1 -2
- package/skills/README.md +3 -1
- package/skills/sale-performance-query/SKILL.md +2 -2
- package/skills/sale-performance-query/references/vps-sales-agent-five-suite.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-customer-mix.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-dept-breakdown.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-entities.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-invoice-status.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-order-logistics.md +1 -1
- package/skills/sale-performance-query/references/vps-sales-target-achievement.md +1 -1
- package/skills/vps-attendance/SKILL.md +24 -0
- package/skills/vps-current-user-identity/reference.md +2 -2
- package/skills/vps-daily-sales-report/SKILL.md +1 -1
- package/skills/vps-daily-sales-report/reference.md +2 -2
- package/skills/vps-device-abnormal-statistics/references/api.md +5 -5
- package/skills/vps-documents/SKILL.md +20 -2
- package/skills/vps-documents/references/api.md +28 -2
- package/skills/vps-hr/SKILL.md +13 -4
- package/skills/vps-hr-compensation-documents/SKILL.md +1 -1
- package/skills/vps-hr-compensation-documents/reference.md +2 -2
- package/skills/vps-hr-compensation-documents/references/+payslip.md +1 -1
- package/skills/vps-hr-compensation-documents/references/runtime-and-helpers.md +1 -1
- package/skills/vps-im/SKILL.md +2 -2
- package/skills/vps-im/references/vps-im-read.md +2 -2
- package/skills/vps-knowledge/SKILL.md +25 -0
- package/skills/vps-pending-approval-assistant/SKILL.md +1 -1
- package/skills/vps-pending-approval-assistant/reference.md +7 -7
- package/skills/vps-product/SKILL.md +3 -3
- package/skills/vps-sale-personnel-efficiency/SKILL.md +2 -2
- package/skills/vps-shared/SKILL.md +2 -3
- package/skills/vps-v-drive/SKILL.md +1 -1
- package/skills/vps-work/SKILL.md +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vps-work",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "VPS Work CLI - tenant-aware domain shortcuts and bundled agent skills for Cursor / Claude Code / Trae.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "he-linyan",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"url": "https://gitee.com/he-linyan/vps-cli/issues"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
|
-
"odoo",
|
|
18
17
|
"cli",
|
|
19
18
|
"ai-skills",
|
|
20
19
|
"ai-cli",
|
package/skills/README.md
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
| (共用) | `vps-shared` | 登录、身份、`+` 约定 |
|
|
10
10
|
| `sales` | `sale-performance-query` | 总销日报、部门 OKR 达成、销售人效 |
|
|
11
11
|
| `store` | `vps-store-management` | 门店接待、进店转化与客户过程数据 |
|
|
12
|
-
| `hr` | `vps-hr` |
|
|
12
|
+
| `hr` | `vps-hr` | 人员档案、组织架构、岗位职责/SOP(部门、岗位、个人查询)、薪酬单据、工资条 |
|
|
13
|
+
| `attendance` | `vps-attendance` | 考勤日报、排班、假期余额与考勤申请 |
|
|
14
|
+
| `knowledge` | `vps-knowledge` | 企业知识库、V盘资料导入、检索、问答与知识图谱 |
|
|
13
15
|
| `product` | `vps-product` | 库存、商品价格、发货、齐套物料、机头库存 |
|
|
14
16
|
| `task` | `vps-task-management-assistant` | 任务中心项目 / 任务 / 待办 / PDCA 协助人 / OKR |
|
|
15
17
|
| `approval` | `vps-approval` | 审批队列 |
|
|
@@ -139,7 +139,7 @@ vps-work sales +trend --period this_year --grain month \
|
|
|
139
139
|
- 用户说“按一级部门”时使用 `+dept-breakdown --group-by dept_l1`。
|
|
140
140
|
- 用户说“继续到二级部门”或“一级部门和二级部门一起”时,不要只查 `dept_l2`。先查 `dept_l1`,再对每个一级部门执行 `+dept-breakdown --group-by dept_l2 --dept-l1 <一级部门>`,最后按“一级部门 / 二级部门 / 小计”展示。
|
|
141
141
|
- 二级部门的订单数子项相加可能大于一级小计,因为同一销售单可能跨二级部门分摊;展示时需要提示这个口径。
|
|
142
|
-
- 当前在线
|
|
142
|
+
- 当前在线 销售脚本没有额外“匹配部门规则”;忽略历史特例后,`匹配部门` 字段等同业绩所属门店(`hdn1.current_name`)。业务业绩、目标达成默认仍可用 `department_mode=matched` 表示按 `匹配部门` 字段汇总;用户明确说“原始组织/组织架构/一级二级三级部门”才用 `department_mode=raw`。
|
|
143
143
|
- 用户说“全公司渠道 / 按最新组织架构渠道”时使用 `group_by=org_channel`,它按当前一级部门归为 `AI渠道 / 国内渠道 / 海外渠道 / 其它部门`。不要使用 `group_by=channel`;后者是销售订单的渠道字段,不是组织架构渠道。
|
|
144
144
|
|
|
145
145
|
## OKR 合并
|
|
@@ -157,7 +157,7 @@ vps-work sales +trend --period this_year --grain month \
|
|
|
157
157
|
## 人员业绩归属
|
|
158
158
|
|
|
159
159
|
- 查某个人实际业绩优先用 `+headline-kpi --name <姓名>` 或 `+personal-okr --params '{"salesperson_like":"<姓名>"}'`;能确定工号时用 `--work-id` / `work_id` 更稳。
|
|
160
|
-
-
|
|
160
|
+
- 实际业绩归属来自销售行口径:在线订单使用 `apportionment_ratio_line.user_id/department_id`,没有分摊时回落 `sale_order.user_id/department_id`;一级/二级部门来自这个“业绩部门”关联后的组织树。
|
|
161
161
|
- `+personal-okr` 展示人员部门时优先取人员视图,再回落销售行部门。若该人在查询窗口没有销售行,显示的部门主要来自人员视图,不代表该窗口有业绩归属。
|
|
162
162
|
- 回答“是否按视图查询”时区分:实际金额按销售视图/代码化销售行口径;人员展示部门可能来自人员视图。
|
|
163
163
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
## 口径
|
|
32
32
|
|
|
33
|
-
- Sell-in:直接查询
|
|
33
|
+
- Sell-in:直接查询 `销售订单明细`,范围为国内代理部门 ID `2234` 及其完整子树,按客户名称汇总实际金额和数量;不用会脱敏客户名的公共销售行构造器,否则无法精确筛选代理商。
|
|
34
34
|
- Sell-out:与 `vps-ep` 个性化看板一致,取 `dealer_sale_order` 中 `state=done + dealer_nature=domestic`,不额外限制 `JXSD` 或 `doc_type=so`;汇总金额取订单 `total`。
|
|
35
35
|
- `+dealer-final-sales` 是另一套严格终销口径,仍限制 `JXSD + done + so + 非退货明细`,不要与代理商个性化看板 Sell-out 混用。
|
|
36
36
|
- 五件套真实业绩按经销商订单客户类型映射:自然进店→`walk in`、老客户存量→`存量`、线上渠道:官网+社媒→`原线上`、商场线下:异业销售推荐→`下线`、招聘:新员工自带客户转化→`AI招聘`。
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `--group-by <dim>` | `group_by` | `dept_l1`…`dept_l5` / `matched_dept` 或 `match_dept` / `salesperson` / `product_subcategory` / `product_category` / `customer_category` |
|
|
18
18
|
| `--auto-next-level` | `auto_next_level` | 未传 group_by 时按部门深度推断,默认 true |
|
|
19
19
|
|
|
20
|
-
`department_mode=matched` 会强制按销售行的 `匹配部门` 字段汇总;当前在线
|
|
20
|
+
`department_mode=matched` 会强制按销售行的 `匹配部门` 字段汇总;当前在线 脚本没有额外匹配规则,忽略历史特例后该字段等同业绩所属门店。`department_mode=raw` 会强制按 `dept_l1`…`dept_l5` 原始组织层级汇总。
|
|
21
21
|
|
|
22
22
|
## 示例
|
|
23
23
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
| 字段 | 含义 | 示例 |
|
|
16
16
|
|------|------|------|
|
|
17
17
|
| `product_category` | 业务二次分类(产线) | `手机`、`IOT配件` |
|
|
18
|
-
| `product_major_category` |
|
|
18
|
+
| `product_major_category` | 商品大类 | `戒指`、`腕表` |
|
|
19
19
|
| `product_subcategory` | 系列/细类 | `VERTU AGENT Q` |
|
|
20
20
|
|
|
21
21
|
查**手机正式销售**用 `product_category=手机`,不要用 `product_major_category=手机`。`product_category=其他` 常含样机,分析正式销售时需排除。
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- 同时覆盖开票申请的 `sales_order` 直接关联和 `joint_order` 联合开票关联。
|
|
16
16
|
- 一个销售单存在多次申请时逐条返回,并用 `是否最新申请=true` 标识按申请日期、申请 ID 排序后的最新一条。
|
|
17
17
|
- 找不到销售单返回 `not_found / 未找到销售单`;销售单存在但没有开票申请返回 `not_applied / 未申请`。
|
|
18
|
-
-
|
|
18
|
+
- 原始状态完整映射为:`draft / 草稿`、`approval / 审批中`、`done / 已完成`、`cancel / 已取消`。
|
|
19
19
|
- `+reconciled-receipts` 中原有的“已开票”只表示申请数量大于零,不能用于回答真实申请状态。
|
|
20
20
|
|
|
21
21
|
## 参数
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| `--logistics-no <no>` | `logistics_no` | 物流单号或出库单号精确匹配;高级参数 `fuzzy=true` 时包含匹配 |
|
|
22
22
|
| `--department <name>` | `department` | 兼容旧用法:销售员所在部门名称或完整部门路径包含匹配;一般优先用 `+orders` |
|
|
23
23
|
| `--salesperson <name>` / `--name <name>` | `salesperson` | 兼容旧用法:销售员姓名 / 登录名包含匹配;一般优先用 `+orders` |
|
|
24
|
-
| `--user-id <id>` | `user_id` | 兼容旧用法:销售员
|
|
24
|
+
| `--user-id <id>` | `user_id` | 兼容旧用法:销售员 用户 ID 精确匹配;一般优先用 `+orders` |
|
|
25
25
|
|
|
26
26
|
共享时间参数见 [`vps-sales-shared-params.md`](vps-sales-shared-params.md)。本 Shortcut 仍支持 `--period`、`--start-date`、`--end-date`、`--limit`、`--page`。
|
|
27
27
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- 部门目标默认读取管理端 `/admin/data-view/dept-monthly-okr` 使用的 `部门OKR_1`,按月份和展示层级汇总。需要核对迁移后的 `vps_okr_department_performance_targets` 时显式传 `okr_source=postgres` / `--okr-source postgres`。
|
|
16
16
|
- 达成率 = 实际销额 / 期间目标 × 100。
|
|
17
17
|
- 月/季/年目标一般不按日折算;更短窗口可能按覆盖天数折算(见子 skill `target_proration`)。
|
|
18
|
-
- `department_mode=matched` 按销售行的 `匹配部门` 字段聚合销售额和目标,并返回目标部门的 `dept_l1`~`dept_l5`;同时传 `dept_l1`~`dept_l5` 时,先按匹配部门汇总,再按合并后的目标层级过滤。当前在线
|
|
18
|
+
- `department_mode=matched` 按销售行的 `匹配部门` 字段聚合销售额和目标,并返回目标部门的 `dept_l1`~`dept_l5`;同时传 `dept_l1`~`dept_l5` 时,先按匹配部门汇总,再按合并后的目标层级过滤。当前在线 脚本没有额外匹配规则,忽略历史特例后该字段等同业绩所属门店。
|
|
19
19
|
- `department_mode=raw` 按原始组织层级聚合,适合排查组织架构字段。
|
|
20
20
|
- 公司整体目标对全部 `target_amount` 求和,包括 `sales_amount=0` 的目标行。任何主动排除都必须披露排除部门、数量、金额和排除前后合计。
|
|
21
21
|
- 响应中的 `filter.exclusions` 是必须向用户披露的默认/显式排除项;`company_target_rule` 是公司目标汇总口径,回答时必须遵守。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vps-attendance
|
|
3
|
+
description: VPS 原生考勤:日报、排班、请假、出差、外勤、加班、补卡、换班申请,假期策略与余额。入口 `vps-work attendance +…`。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# attendance(考勤)
|
|
7
|
+
|
|
8
|
+
开始前读取 [`../vps-shared/SKILL.md`](../vps-shared/SKILL.md)。日期归属、时长、余额、冲突、审批流和可操作状态全部以考勤服务返回结果为准,客户端不得自行推算。
|
|
9
|
+
|
|
10
|
+
## 申请命令
|
|
11
|
+
|
|
12
|
+
| 命令 | 用途 |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `attendance +applications` | 查询本人申请,可用 `--params` 传服务端过滤条件 |
|
|
15
|
+
| `attendance +application-preview` | 提交前解析审批流和服务端计算结果 |
|
|
16
|
+
| `attendance +leave-types` | 查询假期类型和能力字段 |
|
|
17
|
+
| `attendance +leave-options` | 查询申请选项 |
|
|
18
|
+
| `attendance +leave-policy` | 解析日期范围对应的请假策略和余额 |
|
|
19
|
+
| `attendance +leave-balances` | 查询本人假期余额 |
|
|
20
|
+
| `attendance +overtime-balances` | 查询本人加班余额 |
|
|
21
|
+
| `attendance +application-submit --params-file <json>` | 提交请假、出差、外勤、加班、补卡或换班 |
|
|
22
|
+
| `attendance +application-cancel --request-id <id>` | 取消本人待审批申请 |
|
|
23
|
+
|
|
24
|
+
申请体始终使用 `vps-work catalog --domain attendance --json` 当前返回的 `params_schema`。旧版 CLI 使用 `vps-work exec --skill vps-attendance-applications --script <script_key>`,无需升级 npm。
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
| `manager_id` | int | 从员工所在部门向上解析到的最近有效部门负责人员工 ID(排除本人) | 没有可用部门负责人 |
|
|
31
31
|
| `manager_name` | str | 上级姓名 | 同上 |
|
|
32
32
|
| `manager_user_id` | int | 上级关联的 `res.users.id`(**用它做"我上级"过滤**) | 上级是无系统账号的纯员工 |
|
|
33
|
-
| `employment_started_at` | str |
|
|
34
|
-
| `employment_ended_at` | str |
|
|
33
|
+
| `employment_started_at` | str | 入职日期换算的上海时区起始边界(ISO 8601) | 员工档案未维护入职日期 |
|
|
34
|
+
| `employment_ended_at` | str | 离职日期换算的就业有效期结束边界(ISO 8601) | 仍在职或员工档案未维护离职日期 |
|
|
35
35
|
| `profile_unavailable` | str | 仅当 HR 人员目录(VPS 原生 HR 档案视图)在当前环境返回 503 不可用时出现,值为服务端原因 | 正常环境不出现 |
|
|
36
36
|
|
|
37
37
|
> 当出现 `profile_unavailable` 时,`user_id` / `employee_id` / `department_id` / `department_path` / `department_chain`(按 `department_path` 拆分)仍来自平台会话且可用;`manager_*`、`job_*`、入离职日期等档案补充字段为空,不要因此重试。
|
|
@@ -74,7 +74,7 @@ IOT 用 `product_category=IOT配件`,分类包含手链。`monthly_daily_trend
|
|
|
74
74
|
|------|------|---------|
|
|
75
75
|
| 环比/同比为空 | 上期/去年同期数据不存在(新部门) | 脚本用 COALESCE 处理 NULL,展示时标注"无同期数据" |
|
|
76
76
|
| 目标达成率异常高/低 | `部门OKR_1` 目标部门名与销售匹配部门不一致 | 先查 `+dept-monthly-okr` 核对管理端同源目标;必要时用 `--okr-source postgres` 对比迁移后的新表 |
|
|
77
|
-
| 部门销售为空 | 使用了 `匹配部门` 而非 `一级部门` |
|
|
77
|
+
| 部门销售为空 | 使用了 `匹配部门` 而非 `一级部门` | 销售明细 视图直接用 `一级部门`~`四级部门` |
|
|
78
78
|
| `period=custom` 报错 | 必填 `--start-date/--end-date`(execute/API: `start_date/end_date`) | 同时提供两个日期,或者改用枚举 period / `--period YYYY-MM-DD` |
|
|
79
79
|
|
|
80
80
|
## 关联技能
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
| `logistics_no` | string | "" | order_list / order_logistics | 物流单号或出库单号;订单查询用它反查订单摘要 |
|
|
81
81
|
| `department` | string | "" | order_logistics | 兼容旧用法;部门/销售员维度一般优先用 `order_list` |
|
|
82
82
|
| `salesperson` | string | "" | order_list / order_logistics | 销售员姓名 / 登录名包含匹配;批量订单优先用 `order_list` |
|
|
83
|
-
| `user_id` | int | "" | order_logistics | 兼容旧用法:销售员
|
|
83
|
+
| `user_id` | int | "" | order_logistics | 兼容旧用法:销售员 用户 ID 精确匹配 |
|
|
84
84
|
| `fuzzy` | bool | false | order_logistics | 订单号相关字段是否包含匹配 |
|
|
85
85
|
| `include_deposit` | bool | false | headline_kpi / dept_breakdown / customer_sales_mix / dept_comparison / dept_target_achievement / monthly_daily_trend / employee_ranking_top_bottom / refund_summary | 业绩口径:false=不含定金(默认,业绩看板口径),true=含定金;`service_dept_sales_summary` 当前固定含定金 |
|
|
86
86
|
| `order_types` | string/list | sale,service,repair,jky | reconciled_sales_receipts | 销售单、销售服务单、销售维修单、吉客云销售订单;固定查询最近30个自然日 |
|
|
@@ -166,7 +166,7 @@ Content-Type: application/json
|
|
|
166
166
|
}
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
成功结果中的 `
|
|
169
|
+
成功结果中的 `rows` 为业务明细,继续翻页使用 `pagination.next_offset`;内部连接信息不会返回终端。
|
|
170
170
|
|
|
171
171
|
## 七、跨 shell 传参约定
|
|
172
172
|
|
|
@@ -124,11 +124,11 @@ CLI 不直连上游,而是携带当前 VPS 身份访问 vps-service 权限代
|
|
|
124
124
|
|
|
125
125
|
## 数据来源
|
|
126
126
|
|
|
127
|
-
-
|
|
128
|
-
- 库存:缓存 `
|
|
129
|
-
-
|
|
127
|
+
- 销售:`sale_order_line_report_small`。
|
|
128
|
+
- 库存:缓存 `device_stats__inventory_all`,缺失时查 `stock_quant_report`。
|
|
129
|
+
- 在途:`transit_logistics_report`,要求 `is_in_transit=true`。
|
|
130
130
|
- OTA:缓存 `device_stats_ota_all1`,缺失时查 `ota_设备日志`。
|
|
131
131
|
- VPUSH:缓存 `device_stats_vpush_all1`,缺失时查 `v_push.device`。
|
|
132
|
-
-
|
|
133
|
-
-
|
|
132
|
+
- 出库/生产:`vsn_product_manufacture_info`。
|
|
133
|
+
- 售后维修:`after_sale_maintenance` 与 `vsn_index`。
|
|
134
134
|
- 异常配置与处理记录:`device_anomaly`、`device_anomaly_processings`。
|
|
@@ -22,12 +22,29 @@ description: 查询、读取、新建、重命名、复制、导出和共享 Ver
|
|
|
22
22
|
| 新建智能表格 | `vps-work docs +create --title <标题> --type sheet` |
|
|
23
23
|
| 新增多维表 | `vps-work docs +create --title <标题> --type base` |
|
|
24
24
|
| 读取多维表结构 | `vps-work docs +base-schema --doc-id <uuid>` |
|
|
25
|
-
| 读取多维表记录 | `vps-work docs +base-records --doc-id <uuid> --table <id
|
|
25
|
+
| 读取多维表记录 | `vps-work docs +base-records --doc-id <uuid> --table <id> [--archived]` |
|
|
26
26
|
| 新增多维表记录 | `vps-work docs +base-create-records --doc-id <uuid> --table <id> --records-file <json>` |
|
|
27
|
+
| 在锚点前/后插入 | `vps-work docs +base-insert-records --doc-id <uuid> --table <id> --view-id <id> --anchor-id <id> --position before\|after` |
|
|
28
|
+
| 复制多维表记录 | `vps-work docs +base-duplicate-records --doc-id <uuid> --table <id> --view-id <id> --ids <id>` |
|
|
29
|
+
| 调整行顺序 | `vps-work docs +base-reorder-records --doc-id <uuid> --table <id> --view-id <id> --ids <id> --drop-index <n>` |
|
|
30
|
+
| 归档 / 恢复记录 | `vps-work docs +base-archive-records` / `+base-restore-records --doc-id <uuid> --table <id> --ids <id>` |
|
|
27
31
|
| 更新多维表记录 | `vps-work docs +base-update-records --doc-id <uuid> --table <id> --records-file <json>` |
|
|
28
32
|
| 新增多维表字段 | `vps-work docs +base-create-field --doc-id <uuid> --table <id> --name <名称> --type <类型>` |
|
|
33
|
+
| 锁定 / 解锁视图 | `vps-work docs +base-lock-view --doc-id <uuid> --table <id> --view-id <id> --locked true\|false` |
|
|
34
|
+
| 创建视图镜像 | `vps-work docs +base-create-mirror --doc-id <uuid> --table <id> --view-id <id> --name <名称>` |
|
|
35
|
+
| 镜像成员授权 | `vps-work docs +base-set-mirror-grants --doc-id <uuid> --table <id> --mirror-id <id> --grants-file <json>` |
|
|
36
|
+
| 记录变更历史 | `vps-work docs +base-record-history --doc-id <uuid> --table <id> --record <id>` |
|
|
37
|
+
| 整表变更历史 | `vps-work docs +base-table-history --doc-id <uuid> --table <id>` |
|
|
38
|
+
| 冻结列 / 改视图配置 | `vps-work docs +base-update-view --doc-id <uuid> --table <id> --view-id <id> --frozen-field-id <id>` |
|
|
29
39
|
| 导入 CSV | `vps-work docs +base-import --doc-id <uuid> --table <id> --csv-file <csv>` |
|
|
30
40
|
| 导出 CSV | `vps-work docs +base-export --doc-id <uuid> --table <id>` |
|
|
41
|
+
| 列出自动化 | `vps-work docs +base-workflows --doc-id <uuid>` |
|
|
42
|
+
| 创建自动化 | `vps-work docs +base-create-workflow --doc-id <uuid> --name <名称> --draft-file <json>` |
|
|
43
|
+
| 发布自动化 | `vps-work docs +base-apply-workflow --doc-id <uuid> --workflow-id <id>` |
|
|
44
|
+
| 运行历史 | `vps-work docs +base-workflow-runs --doc-id <uuid> --workflow-id <id>` |
|
|
45
|
+
| 列出 Routine | `vps-work docs +base-routines --doc-id <uuid>` |
|
|
46
|
+
| 创建 Routine | `vps-work docs +base-create-routine --doc-id <uuid> --name <名称> --draft-file <json>` |
|
|
47
|
+
| 点击按钮字段 | `vps-work docs +base-click-button --doc-id <uuid> --table <id> --record <id> --field-id <id>` |
|
|
31
48
|
| 读取智能表格 | `vps-work docs +sheet-get --doc-id <uuid>` |
|
|
32
49
|
| 更新智能表格单元格 | `vps-work docs +sheet-set-cells --doc-id <uuid> --updates-file <json>` |
|
|
33
50
|
| 新建文件夹 | `vps-work docs +create --title <标题> --type folder` |
|
|
@@ -61,7 +78,8 @@ description: 查询、读取、新建、重命名、复制、导出和共享 Ver
|
|
|
61
78
|
- `public-edit` 会允许持链接编辑,风险较高;用户没有明确要求时不得启用。
|
|
62
79
|
- 复制、创建、重命名和共享是写操作;根据用户意图执行。删除能力目前不向 Agent CLI 开放。
|
|
63
80
|
- 命令默认输出 JSON,优先读取 `id`、`title`、`type`、`role`、`shareMode`、`content`。
|
|
64
|
-
- 多维表字段 `--type`:`singleLineText`、`longText`、`number`、`singleSelect`、`multipleSelect`、`checkbox`、`date`、`attachment`。附件字段值为 `{ name, url, mimeType?, sizeBytes? }`
|
|
81
|
+
- 多维表字段 `--type`:`singleLineText`、`longText`、`number`、`singleSelect`、`multipleSelect`、`checkbox`、`date`、`attachment`、`member`、`button`、`rating`、`formula`、`link`、`rollup`、`conditionalRollup`、`autoNumber`、`createdTime`、`lastModifiedTime`、`createdBy`、`lastModifiedBy`。查找是模式:`--lookup` / `--conditional-lookup` 加 `--lookup-options`。附件字段值为 `{ name, url, mimeType?, sizeBytes? }` 数组。人员字段值为 `{ membershipId, name, avatarUrl?, userId? }` 数组,必须来自通讯录;`options.isMultiple` 控制是否允许多人。关联单元格为 `{ id, title }` 数组;双向关联会在目标表创建对称字段。评分 `options.max` 为 1–10。公式 / 汇总写 `options.expression`(汇总用 `{values}`)。计算字段和查找不可写入。按钮字段绑定 `options.workflow.id`,点击走 `+base-click-button`。视图 `config.group` 为 `[{ fieldId, order }]`,最多 3 层。视图 `config.columnMeta[fieldId].order` 控制列序;未开排序时用视图行序,`sorts` 存在即自动排序,禁止插入定位与拖行。`view.isLocked` 锁定筛选/排序/分组/隐藏列/冻结列/列拖拽,不禁止改记录。`config.frozenFieldId` 冻结到该字段右侧,默认首列。隐藏列写 `columnMeta[fieldId].hidden`(旧 `hiddenFieldIds` 仍可读);向左/向右插入列走 `+base-create-field --view-id --order`,其它视图默认隐藏新列。归档记录用 `--archived` 查看,硬删除仍走现有删除接口。上游没有锁定行。视图镜像是 VPS 侧栏节点:管理员继承原表,成员授权 `hidden` / `view` / `edit`,人选必须来自通讯录。被 `view`/`edit` 收窄的成员看不到原表,读写必须带 `mirrorId`。记录历史对齐 Teable:只记字段 before/after,不含视图/结构/权限审计;`+base-record-history` / `+base-table-history` 支持 `startDate`/`endDate`/`fieldIds`/`createdByIds`/`cursor`,owner/manager/editor 可读,viewer 不可读。按钮点击也会入历史。
|
|
82
|
+
- 自动化对齐 Teable:触发器含记录创建/更新/条件、表单提交、定时、按钮、Webhook、IMAP;动作含增改查记录、HTTP、AI、脚本、邮件、条件/循环。草稿用 `+base-create-workflow` / `+base-update-workflow`,发布用 `+base-apply-workflow`。定时 AI 用 Routine。Webhook 公开地址为 `/v1/public/base-hooks/:docId/:workflowId`。
|
|
65
83
|
|
|
66
84
|
## 示例
|
|
67
85
|
|
|
@@ -17,14 +17,40 @@ CLI 统一请求 `vps-service`,由服务端校验 Hermes Agent Key、解析当
|
|
|
17
17
|
| `docs +base-schema` | `GET /v1/documents/:id/base` | 多维表结构 |
|
|
18
18
|
| `docs +base-tables` | `GET /v1/documents/:id/base` | 从 schema 取出 tables |
|
|
19
19
|
| `docs +base-create-table` | `POST /v1/documents/:id/base/tables` | 新建数据表 |
|
|
20
|
-
| `docs +base-records` | `GET /v1/documents/:id/base/tables/:tableId/records` |
|
|
21
|
-
| `docs +base-create-records` | `POST /v1/documents/:id/base/tables/:tableId/records` |
|
|
20
|
+
| `docs +base-records` | `GET /v1/documents/:id/base/tables/:tableId/records` | 记录列表,`archived=1` 只看归档 |
|
|
21
|
+
| `docs +base-create-records` | `POST /v1/documents/:id/base/tables/:tableId/records` | 批量新增记录,可带 `order` |
|
|
22
|
+
| `docs +base-insert-records` | `POST /v1/documents/:id/base/tables/:tableId/records/insert` | 锚点前/后插入空行 |
|
|
23
|
+
| `docs +base-duplicate-records` | `POST /v1/documents/:id/base/tables/:tableId/records/duplicate` | 复制记录 |
|
|
24
|
+
| `docs +base-reorder-records` | `POST /v1/documents/:id/base/tables/:tableId/records/reorder` | 视图内拖行 |
|
|
25
|
+
| `docs +base-archive-records` | `POST /v1/documents/:id/base/tables/:tableId/records/archive` | 归档记录 |
|
|
26
|
+
| `docs +base-restore-records` | `POST /v1/documents/:id/base/tables/:tableId/records/restore` | 恢复归档 |
|
|
22
27
|
| `docs +base-update-records` | `PATCH /v1/documents/:id/base/tables/:tableId/records` | 批量更新记录 |
|
|
23
28
|
| `docs +base-create-field` | `POST /v1/documents/:id/base/tables/:tableId/fields` | 新增字段 |
|
|
24
29
|
| `docs +base-views` | `GET /v1/documents/:id/base/tables/:tableId/views` | 视图列表 |
|
|
25
30
|
| `docs +base-create-view` | `POST /v1/documents/:id/base/tables/:tableId/views` | 新建视图 |
|
|
31
|
+
| `docs +base-lock-view` | `PATCH /v1/documents/:id/base/tables/:tableId/views/:viewId/locked` | 锁定/解锁视图配置 |
|
|
32
|
+
| `docs +base-update-view` | `PATCH /v1/documents/:id/base/tables/:tableId/views/:viewId` | 更新视图配置,可设 `frozenFieldId` |
|
|
33
|
+
| `docs +base-create-mirror` | `POST /v1/documents/:id/base/tables/:tableId/mirrors` | 从视图创建镜像表 |
|
|
34
|
+
| `docs +base-rename-mirror` | `PATCH /v1/documents/:id/base/tables/:tableId/mirrors/:mirrorId` | 重命名镜像表 |
|
|
35
|
+
| `docs +base-delete-mirror` | `DELETE /v1/documents/:id/base/tables/:tableId/mirrors/:mirrorId` | 删除镜像表 |
|
|
36
|
+
| `docs +base-set-mirror-grants` | `PUT /v1/documents/:id/base/tables/:tableId/mirrors/:mirrorId/grants` | 覆盖镜像通讯录授权 |
|
|
37
|
+
| `docs +base-record-history` | `GET /v1/documents/:id/base/tables/:tableId/records/:recordId/history` | 单条记录字段变更历史 |
|
|
38
|
+
| `docs +base-table-history` | `GET /v1/documents/:id/base/tables/:tableId/records/history` | 整表字段变更历史 |
|
|
26
39
|
| `docs +base-import` | `POST /v1/documents/:id/base/tables/:tableId/import` | CSV 导入 |
|
|
27
40
|
| `docs +base-export` | `GET /v1/documents/:id/base/tables/:tableId/export` | CSV 导出 |
|
|
41
|
+
| `docs +base-workflows` | `GET /v1/documents/:id/base/workflows` | 自动化列表 |
|
|
42
|
+
| `docs +base-create-workflow` | `POST /v1/documents/:id/base/workflows` | 创建草稿 |
|
|
43
|
+
| `docs +base-update-workflow` | `PATCH /v1/documents/:id/base/workflows/:workflowId` | 更新草稿 |
|
|
44
|
+
| `docs +base-apply-workflow` | `POST /v1/documents/:id/base/workflows/:workflowId/apply` | 发布启用 |
|
|
45
|
+
| `docs +base-workflow-runs` | `GET /v1/documents/:id/base/workflows/:workflowId/runs` | 运行历史 |
|
|
46
|
+
| `docs +base-rerun-workflow` | `POST /v1/documents/:id/base/workflows/:workflowId/runs/:runId/rerun` | 失败重跑 |
|
|
47
|
+
| `docs +base-routines` | `GET /v1/documents/:id/base/routines` | Routine 列表 |
|
|
48
|
+
| `docs +base-create-routine` | `POST /v1/documents/:id/base/routines` | 创建 Routine |
|
|
49
|
+
| `docs +base-apply-routine` | `POST /v1/documents/:id/base/routines/:routineId/apply` | 发布 Routine |
|
|
50
|
+
| `docs +base-run-routine` | `POST /v1/documents/:id/base/routines/:routineId/run` | 立即运行 |
|
|
51
|
+
| `docs +base-secrets` | `GET /v1/documents/:id/base/secrets` | 密钥名列表 |
|
|
52
|
+
| `docs +base-put-secret` | `POST /v1/documents/:id/base/secrets` | 写入密钥 |
|
|
53
|
+
| `docs +base-click-button` | `POST /v1/documents/:id/base/tables/:tableId/records/:recordId/fields/:fieldId/click` | 点击按钮 |
|
|
28
54
|
| `docs +share` | `POST /v1/documents/:id/share` | 修改共享模式 |
|
|
29
55
|
| `docs +send` | `GET /v1/documents/:id` + 可选 `POST /share` + IM 消息接口 | 生成 `document_share` 卡片并发送到当前 Hermes/VPS IM 会话 |
|
|
30
56
|
| `docs +duplicate` | `POST /v1/documents/:id/duplicate` | 复制文档 |
|
package/skills/vps-hr/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vps-hr
|
|
3
3
|
description: |
|
|
4
|
-
|
|
4
|
+
VPS 原生人力资源:身份、组织、档案、合同、工资条,以及入职、转正、调岗、晋升、降级和离职办理。入口 `vps-work hr +…`。
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# hr(人力资源)
|
|
@@ -11,7 +11,7 @@ description: |
|
|
|
11
11
|
| Shortcut | 说明 | 契约 |
|
|
12
12
|
|----------|------|------|
|
|
13
13
|
| [`+me`](../vps-current-user-identity/SKILL.md) | 当前用户身份 | 内建 `vps-work hr +me` |
|
|
14
|
-
| `+org-tree` |
|
|
14
|
+
| `+org-tree` | 组织部门树;`--department` 限定子树,`--include-users` 同时返回员工;`--max-depth 0` 查看全量 | Vertu 通讯录 |
|
|
15
15
|
| `+headcount` | 授权范围内的通讯录口径人数统计;返回人数与在职拆分 | 普通员工为本人,部门负责人为负责部门;全公司需要 `hr.profile.all:read` |
|
|
16
16
|
| `+profile` | 本人人事档案;含部门、岗位、上级、入职/转正/离职、工龄、最新合同 | `hr-personnel-directory` data-view |
|
|
17
17
|
| `+tenure` | 本人工龄与入职/转正/离职信息 | `hr-personnel-directory` data-view |
|
|
@@ -21,12 +21,20 @@ description: |
|
|
|
21
21
|
| `+contracts` | 合同信息;本人可查,查询他人需要 `hr.profile.contract:read` | `--all` 只取消 CLI 本人过滤,不能扩大服务端人员范围 |
|
|
22
22
|
| [`+payslip`](../vps-hr-compensation-documents/references/+payslip.md) | 工资条 | `vps-hr-compensation-documents` |
|
|
23
23
|
| `+personnel-info` | 授权范围内的 HR 人员信息;部门负责人默认仅有基本字段 | 任职、合同、历史档案分别需要独立 scope |
|
|
24
|
+
| `+business-list` | 人员与入职、试用、待离职等办理状态 | VPS 原生新人事 |
|
|
25
|
+
| `+create-employee` | 创建企业员工档案 | 参数使用 `--params-file` |
|
|
26
|
+
| `+onboarding` / `+confirm-onboarding` | 发起或确认入职 | `vps-hr-business` |
|
|
27
|
+
| `+transfer` | 调岗、晋升或降级 | `vps-hr-business` |
|
|
28
|
+
| `+resignation` / `+confirm-resignation` | 发起或确认离职 | `vps-hr-business` |
|
|
29
|
+
| `+confirm-regular` | 确认转正 | `vps-hr-business` |
|
|
30
|
+
| `+business-action` | 执行 catalog 新增的人事动作 | 旧 npm 无需升级 |
|
|
24
31
|
|
|
25
32
|
## 常用自然语言映射
|
|
26
33
|
|
|
27
34
|
| 用户问法 | 命令 |
|
|
28
35
|
|----------|------|
|
|
29
36
|
| 查组织架构 | `vps-work hr +org-tree` |
|
|
37
|
+
| 查部门组织架构和员工名单 | `vps-work hr +org-tree --department "<完整路径或唯一部门名>" --include-users --max-depth 0` |
|
|
30
38
|
| 查授权范围人数 / 在职多少人 | `vps-work hr +headcount` |
|
|
31
39
|
| 查内部在职员工名单 | `vps-work hr +personnel-info --status "在职" --limit 1000` |
|
|
32
40
|
| 查岗位明细 | `vps-work hr +job-details --job "<岗位关键词>"` |
|
|
@@ -34,10 +42,11 @@ description: |
|
|
|
34
42
|
| 查我的上司 / 汇报对象 | `vps-work hr +manager` |
|
|
35
43
|
| 查我的人事档案 / 工龄 / 合同 | `vps-work hr +profile`;只看合同可用 `vps-work hr +contracts` |
|
|
36
44
|
| 按一级/二级部门查人员 | `vps-work hr +personnel-info --department-l1 "<一级部门>" --department-l2 "<二级部门>"` |
|
|
45
|
+
| 办理入职、转正、调岗或离职 | 先运行 `vps-work catalog --domain hr --json`,再使用对应 `hr +… --params-file` |
|
|
37
46
|
|
|
38
47
|
## 字段与口径
|
|
39
48
|
|
|
40
|
-
- `+org-tree` 走 Vertu 通讯录部门树,默认显示一级/二级;需要全量时用 `--max-depth 0
|
|
49
|
+
- `+org-tree` 走 Vertu 通讯录部门树,默认显示一级/二级;需要全量时用 `--max-depth 0`。`--include-users` 会调用同口径的通讯录人员接口并自动拉完分页;配合 `--department` 时只返回该部门及全部下级部门的在职员工。员工输出不包含手机号等无关个人资料。
|
|
41
50
|
- HR 人员范围由服务端计算:普通员工只能查本人;部门负责人默认查直接负责部门;显式部门管理员映射可通过 `include_children` 纳入下级部门;`hr.profile.all:read` 才能查看全公司。
|
|
42
51
|
- 部门负责人默认字段包为 `basic`(姓名、工号、部门、岗位、上级、在职状态)。任职详情、合同和历史人员分别需要 `hr.profile.employment:read`、`hr.profile.contract:read`、`hr.profile.history:read`;`admin:*` 不自动获得这些人事敏感权限。
|
|
43
52
|
- `+headcount` 是授权范围人数统计入口;不要用 `+personnel-info` 拉明细后本地统计人数。
|
|
@@ -46,5 +55,5 @@ description: |
|
|
|
46
55
|
- 回答在职名单或人数时必须主动说明:`口径:仅统计通讯录可见的内部在职员工,已排除外部人员和离职人员。` 若返回 `pagination.has_more=true`,还要说明当前只展示首批结果,不能把 `rows.length` 当作总人数;总人数读取 `pagination.total_rows` 或改用 `+headcount`。
|
|
47
56
|
- `+profile` / `+manager` / `+subordinates` / `+job-details` / `+contracts` / `+personnel-info` 默认只返回授权范围内的通讯录可见人员;历史档案必须同时显式加 `--include-non-directory` 并具备 `hr.profile.history:read`。
|
|
48
57
|
- `+profile` / `+manager` / `+subordinates` 会先取一次 `hr +me`,再用 `employee_id` / `manager_id` 精确过滤。
|
|
49
|
-
- HR 人员视图(`hr-personnel-directory`)读取 VPS 原生 HR 档案(企业成员 + `vps_hr_profiles` +
|
|
58
|
+
- HR 人员视图(`hr-personnel-directory`)读取 VPS 原生 HR 档案(企业成员 + `vps_hr_profiles` + 组织单元);部门层级来自组织单元路径,合同取档案中最新一条。新人事办理使用企业成员 UUID 与服务端 revision,不接收第三方 ERP 用户标识。
|
|
50
59
|
- `+subordinates` 默认递归查询下级团队直到最深层,返回 `level` 与 `manager_chain_text` 辅助识别层级;如只要直属下属,使用 `--direct`。
|
|
@@ -30,7 +30,7 @@ vps-work hr +payslip --name "孔健" --salary-month 2026-04
|
|
|
30
30
|
|
|
31
31
|
## 硬约束
|
|
32
32
|
|
|
33
|
-
- 工资条只来自 VPS 原生 HR,**不再**读取
|
|
33
|
+
- 工资条只来自 VPS 原生 HR,**不再**读取 `employee.salary` / `human.resource.salary`,也不要走 `vps-work` 通道查工资
|
|
34
34
|
- 只返回 `status=published` 的工资条;草稿、已撤回不可见
|
|
35
35
|
- 查他人需要企业管理员(owner / manager)身份,否则服务端返回 403,不要绕行
|
|
36
36
|
- 取数走 CLI 封装:`vps-work hr +payslip`,不要自行拼 SQL 或调用其它接口
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
工资条由企业管理员在 VPS「工资条」应用中按月录入、发布,落在 VPS 原生表 `vps_tenant_payslips`(按企业 tenant 隔离,RLS 强制)。
|
|
8
8
|
`vps-work hr +payslip` → vps-service `POST /v1/execute`(`skill_key=vps-hr-compensation-documents`,`script_key=payslip`)→ 原生表。
|
|
9
|
-
不再依赖
|
|
9
|
+
不再依赖 `vt_salary` 模块。
|
|
10
10
|
|
|
11
11
|
## 2. 访问规则
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|------|------|
|
|
24
24
|
| `salary_month` | `YYYY-MM` 或 `YYYY-MM-DD`,统一按月归一 |
|
|
25
25
|
| `my` | `true` 时查本人 |
|
|
26
|
-
| `employee_id` | 本企业员工号:内部企业为
|
|
26
|
+
| `employee_id` | 本企业员工号:内部企业为 兼容员工号,外部企业为 VPS 分配号;来源 `hr +me` / `hr +personnel-info` |
|
|
27
27
|
| `name` | 姓名,需在本企业成员中唯一,否则 409,请改用 `employee_id` |
|
|
28
28
|
|
|
29
29
|
## 4. 返回结构
|
package/skills/vps-im/SKILL.md
CHANGED
|
@@ -84,12 +84,12 @@ IM 走 Vertu 原生通讯能力,与主登录共用同一份会话/agent key,
|
|
|
84
84
|
vps-work im +agent-notify --body "要发送给用户的内容"
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
如果当前运行环境没有自动注入 `VERTU_AGENT_SLUG` / `
|
|
87
|
+
如果当前运行环境没有自动注入 `VERTU_AGENT_SLUG` / `VERTU_AGENT_USER_ID`,必须显式传当前运行上下文中的参数:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
vps-work im +agent-notify --target auto \
|
|
91
91
|
--agent-slug "<当前专家 agent_slug>" \
|
|
92
|
-
--user-id "<当前用户
|
|
92
|
+
--user-id "<当前用户 user_id>" \
|
|
93
93
|
--session-id "<当前 Hermes session_id>" \
|
|
94
94
|
--channel-id "<自动补齐或已绑定的 IM channel_id>" \
|
|
95
95
|
--hermes-base-url "<Hermes Agent Admin URL,如 http://127.0.0.1:5175>" \
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
| `+users` | `--query` `--department-path` `--include-children` `--limit`(30) | 搜组织成员拿 `user_id` |
|
|
11
11
|
| `+channels` | `--limit`(50) | 我的会话列表,拿 `channel_id` |
|
|
12
12
|
|
|
13
|
-
`+users` 的人员记录还包含 `employment_started_at
|
|
14
|
-
`employment_ended_at
|
|
13
|
+
`+users` 的人员记录还包含 `employment_started_at`(入职日期换算的上海时区起始边界)和
|
|
14
|
+
`employment_ended_at`(离职日期换算的就业有效期结束边界;仍在职时为 `null`),均为 ISO 8601,
|
|
15
15
|
不代表真实事件发生时刻。
|
|
16
16
|
|
|
17
17
|
## +history(历史消息)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vps-knowledge
|
|
3
|
+
description: 企业知识库:创建与管理知识库、从 V盘导入资料、检索、问答和生成知识图谱。入口 `vps-work knowledge +…`,旧版 CLI 可通过 `catalog` 与 `exec` 使用服务端新增能力。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# knowledge(企业知识库)
|
|
7
|
+
|
|
8
|
+
开始前读取 [`../vps-shared/SKILL.md`](../vps-shared/SKILL.md)。知识库使用 VPS 企业身份和租户隔离。
|
|
9
|
+
|
|
10
|
+
## 快捷命令
|
|
11
|
+
|
|
12
|
+
| 命令 | 用途 |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `knowledge +list` | 列出有权访问的知识库 |
|
|
15
|
+
| `knowledge +create --name <名称>` | 创建个人或企业共享知识库 |
|
|
16
|
+
| `knowledge +update --base-id <id>` | 修改名称、描述或可见性 |
|
|
17
|
+
| `knowledge +delete --base-id <id>` | 删除知识库 |
|
|
18
|
+
| `knowledge +documents --base-id <id>` | 查看资料及处理状态 |
|
|
19
|
+
| `knowledge +import-vdrive --base-id <id> --v-drive-item-id <id>` | 导入已有权限的 V盘文件 |
|
|
20
|
+
| `knowledge +search --base-id <id> --question <内容>` | 语义检索 |
|
|
21
|
+
| `knowledge +ask --base-id <id> --question <问题>` | 基于检索证据回答 |
|
|
22
|
+
| `knowledge +graph --base-id <id>` | 读取知识星图 |
|
|
23
|
+
| `knowledge +build-graph --base-id <id>` | 在资料处理完成后生成图谱 |
|
|
24
|
+
|
|
25
|
+
先执行 `vps-work catalog --domain knowledge --json`。若本机 CLI 尚未出现某个快捷命令,使用目录返回的 `skill_key`、`script_key` 和 `params_schema` 调用 `vps-work exec`,不要求先升级 npm 包。
|
|
@@ -23,7 +23,7 @@ description: |
|
|
|
23
23
|
## 硬约束
|
|
24
24
|
|
|
25
25
|
- **下钻明细必须切技能**:用户追问业务字段(金额/伙伴/状态/申请人/明细行 等)时,交给对应业务域 skill,不在本技能里查 res_model 业务表
|
|
26
|
-
- **禁止盲构查询**:字段名/关系/枚举必须出现在 **skills/** 文档中;禁止 `vps-work
|
|
26
|
+
- **禁止盲构查询**:字段名/关系/枚举必须出现在 **skills/** 文档中;禁止 `vps-work knowledge`;禁止 `_fields` 嗅探;缺口 `POST /ai/skills/v1/feedback`
|
|
27
27
|
- 只向用户展示 model_name 与数量,禁止展示 res_model/res_ids/原始 id 列表
|
|
28
28
|
- web.approval.commit/approvaled 与 wait 同形,fields 完全相同
|
|
29
29
|
- 所有 CLI 以当前用户 ACL 执行,不提供法律/强制性建议
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
| 步骤 | CLI(Agent 只用左列) | 实现 |
|
|
5
5
|
|------|----------------------|------|
|
|
6
|
-
| 待办列表 | `vps-work approval +wait` |
|
|
6
|
+
| 待办列表 | `vps-work approval +wait` | VPS 审批服务 |
|
|
7
7
|
| 部门/全员待办 | `vps-work approval +pending --scope department\|all` | VPS 审批镜像 + 显式数据权限 |
|
|
8
|
-
| 我提交的 | `vps-work approval +my-submitted` |
|
|
9
|
-
| 我已审批的 | `vps-work approval +my-approved` |
|
|
10
|
-
| 通过 | `vps-work approval +pass --res-model … --res-id …` |
|
|
11
|
-
| 拒绝 | `vps-work approval +refuse …` |
|
|
12
|
-
| 轨迹 | `vps-work approval +logs …` |
|
|
8
|
+
| 我提交的 | `vps-work approval +my-submitted` | VPS 审批服务 |
|
|
9
|
+
| 我已审批的 | `vps-work approval +my-approved` | VPS 审批服务 |
|
|
10
|
+
| 通过 | `vps-work approval +pass --res-model … --res-id …` | VPS 审批服务 |
|
|
11
|
+
| 拒绝 | `vps-work approval +refuse …` | VPS 审批服务 |
|
|
12
|
+
| 轨迹 | `vps-work approval +logs …` | VPS 审批服务 |
|
|
13
13
|
|
|
14
14
|
## 三种视图的通用查询
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
- 在本技能里直接对业务 `res_model` 自行拼字段绕路。
|
|
47
47
|
- 使用未在 `skills/` 文档出现的字段名(典型反例:未核对就写 `amount_total`、`partner_id`、`state`)。
|
|
48
|
-
- `vps-work
|
|
48
|
+
- `vps-work knowledge`、sandbox `_fields` 嗅探。
|
|
49
49
|
|
|
50
50
|
## 输出结构(对用户)
|
|
51
51
|
|
|
@@ -48,8 +48,8 @@ filter 为模糊包含(ILIKE),留空则不过滤。分页参数适用于
|
|
|
48
48
|
|
|
49
49
|
| Shortcut | 口径 |
|
|
50
50
|
|----------|------|
|
|
51
|
-
| `+inventory` | 与 vps-ep 商品看板统一使用
|
|
52
|
-
| `+inventory-by-vsn` | 直接查询
|
|
51
|
+
| `+inventory` | 与 vps-ep 商品看板统一使用 `mv_inventory` 可用库存,只计 `产成品`、`半成品`且`库存数量 > 0`;商品分类、大类、细类和门店归属以该库存视图为准,销售标准价及颜色/材质/版本由商品维表补充。 |
|
|
52
|
+
| `+inventory-by-vsn` | 直接查询 `stock_lot → stock_quant → stock_location → stock_warehouse`;仅返回数量大于零的内部/在途库位,状态区分 VSN 不存在、不在内部/在途库存、库存中和在途;可用数量=库存数量-预留数量;库位品质区分良品库、非良品库、待检库和在途库。 |
|
|
53
53
|
| `+price` | 基于商品价格维表,直接返回 `销售标准价_CNY/USD/HKD`;不依赖是否有库存。`--price-region overseas` 表示海外版价格,`domestic` 表示国内版价格,`standard` 表示标准区域。 |
|
|
54
54
|
| `+delivery` | 基于 `report_sale_shipment`,关联发货仓、收货部门和完整商品维表;排除不良品库和 `%-YP` 样品编码。可按商品大类/细类/材质/手机版本/上市时间/发货仓/发货日期过滤。 |
|
|
55
55
|
| `+kit-materials` | 基于指定 BOM/物料仓的 `stock_quant` 汇总,输出 BOM 可用库存和商品层级。 |
|
|
@@ -115,7 +115,7 @@ vps-work sales +trend \
|
|
|
115
115
|
--product-category IOT配件
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
折扣计算只统计非置换行。置换包括
|
|
118
|
+
折扣计算只统计非置换行。置换包括 `is_barter_line=true`,历史数据还按出货性质 `置换` / `以旧换新` 识别。
|
|
119
119
|
|
|
120
120
|
- `discount_standard_amount_* = Σ(标准单价 × COALESCE(分摊比例数量, 数量))`
|
|
121
121
|
- `discount_actual_amount_* = Σ(实际业绩)`
|
|
@@ -73,9 +73,9 @@ description: |
|
|
|
73
73
|
|
|
74
74
|
| 现象 | 根因 | 正确做法 |
|
|
75
75
|
|------|------|---------|
|
|
76
|
-
| 在职人数=0 | 部门一级名
|
|
76
|
+
| 在职人数=0 | 部门一级名 销售明细.一级部门 与 人员信息.one_name 命名不一致 | 显示给用户作为"无对应在职人员",不要静默隐藏 |
|
|
77
77
|
| 个人销额 vs OKR 数字差距大 | 销售员只挂工号但本月无 OKR 登记 | 月度目标显示 0,达成率 NULL |
|
|
78
|
-
| 同一人多部门串扰 | 销售员临时调岗 | 以
|
|
78
|
+
| 同一人多部门串扰 | 销售员临时调岗 | 以 销售明细 当行的部门为准展示 |
|
|
79
79
|
|
|
80
80
|
## 关联技能
|
|
81
81
|
|
|
@@ -21,7 +21,7 @@ vps-work auth status
|
|
|
21
21
|
|
|
22
22
|
若状态无效,Agent 必须停止并提示管理员刷新宿主凭证。仅人工用户可在交互终端执行 `vps-work auth login`。
|
|
23
23
|
|
|
24
|
-
V
|
|
24
|
+
V盘与企业云文档统一使用 VPS 企业身份。`drive +…` 返回 401 或 `auth status` 无效时,应检查宿主 Agent Key / Profile HOME 注入状态。
|
|
25
25
|
|
|
26
26
|
Agent 不得读取、输出、复制或修改 `~/.vps-work/vps-service.json` 及其权限,也不得把其中的 Key 拼进 `curl`。排障只运行 `vps-work auth status --json` 并将状态反馈给管理员;业务请求必须继续使用公开的 `vps-work <域> +…` 命令,不得猜测 `/v1/...` 内部路由。
|
|
27
27
|
|
|
@@ -31,7 +31,6 @@ Agent 不得读取、输出、复制或修改 `~/.vps-work/vps-service.json` 及
|
|
|
31
31
|
- **活目录优先**:`vps-work catalog --json`(可加 `--domain sales`)列出当前身份能用的命令。本地 Skill 表不是全集。
|
|
32
32
|
- `transport=execute` 的条目用 `vps-work exec --skill <skill_key> --script <script_key> --param k=v`;不要编造 catalog 里没有的 script_key。
|
|
33
33
|
- 已有的 `vps-work <域> +…` 仍可用;`--help` 只反映本机命令糖衣,不以它判断服务端是否新增了脚本。
|
|
34
|
-
- **数据归属**:catalog 条目带 `provider=odoo` 的(sales / store / product 域)数据来自第三方应用 **Odoo ERP**(客户、订单、商品、库存、合同、经营数据、产销、审批);HR 档案、工资条、IM、云文档、V盘、日程等是 VPS 原生能力。企业管理员在「企业应用 → 第三方 → Odoo ERP」停用该应用后,catalog 会隐藏这些条目、`exec` 返回 403,Agent 应如实告知“本企业未启用 Odoo ERP”,不得绕行。
|
|
35
34
|
- 公开 skill 随 npm 包分发:`vps-work skill list` / `vps-work skill install`(详见 `skills/vps-work/SKILL.md`)。
|
|
36
35
|
|
|
37
36
|
## 当前用户(「我 / 本部门」)
|
|
@@ -42,7 +41,7 @@ Agent 不得读取、输出、复制或修改 `~/.vps-work/vps-service.json` 及
|
|
|
42
41
|
2. Domain DSL 宏 `@me`、`@my_department` 等(见 `skills/vps-current-user-identity/SKILL.md`);
|
|
43
42
|
3. `vps-work auth status`。
|
|
44
43
|
|
|
45
|
-
需要查看组织层级关系时用 `vps-work hr +org-tree`(默认一级/二级部门;全量加 `--max-depth 0
|
|
44
|
+
需要查看组织层级关系时用 `vps-work hr +org-tree`(默认一级/二级部门;全量加 `--max-depth 0`)。需要同时查看某个部门子树及通讯录员工时,加 `--department "<完整路径或唯一部门名>" --include-users`。
|
|
46
45
|
|
|
47
46
|
细则见 `skills/vps-current-user-identity/SKILL.md`。
|
|
48
47
|
|
|
@@ -9,7 +9,7 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
# VPS V盘文件管理
|
|
11
11
|
|
|
12
|
-
开始前先读取 `../vps-shared/SKILL.md`,遵循其中的认证、当前用户与 `+` 快捷约定。Hermes 使用宿主注入的 Agent Key
|
|
12
|
+
开始前先读取 `../vps-shared/SKILL.md`,遵循其中的认证、当前用户与 `+` 快捷约定。Hermes 使用宿主注入的 Agent Key 和当前用户身份。
|
|
13
13
|
|
|
14
14
|
本技能通过 `/v1/v-drive` 操作账号级云端 V盘,文件内容直传阿里云 OSS,元数据由服务端统一管理。它与 VPS Desktop、手机端共用同一份数据,不得绕过 API 写入本地 `v-drive/files/`。命令默认输出 JSON,Hermes 必须从返回值读取 `item.id`,不得根据文件名猜 ID。
|
|
15
15
|
|