weaver-work-cli 0.1.49 → 0.1.52
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/README.md +1 -1
- package/dist/chunks/{attachment-content-MU2LPI5P.js → attachment-content-MBYYSQIX.js} +3 -3
- package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-7UOXOGFL.js} +4 -4
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-3NV2ETZR.js → chunk-D3TDNRFE.js} +8 -8
- package/dist/chunks/{chunk-6GWU63YF.js → chunk-DZOC77ZD.js} +1 -1
- package/dist/chunks/{chunk-K3BT54CU.js → chunk-IRMA3GVP.js} +1 -1
- package/dist/chunks/{chunk-3X7VOSBA.js → chunk-KLZ3ULQQ.js} +1 -1
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-LALWNK6M.js} +167 -44
- package/dist/chunks/{chunk-BRRW7CWA.js → chunk-LM2H7SZI.js} +26 -26
- package/dist/chunks/{chunk-KV5SOWMS.js → chunk-LTRLF6MM.js} +4 -4
- package/dist/chunks/{chunk-D2QRZUW4.js → chunk-RPRFIG6I.js} +35 -28
- package/dist/chunks/{chunk-GEOMANP7.js → chunk-RWFRZSIP.js} +2 -2
- package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-ZRHKGQRQ.js} +2 -2
- package/dist/chunks/{conflict-6347A7YK.js → conflict-D2HYKBMH.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-MFOFMM2J.js} +4284 -254
- package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-7ZATJVTM.js} +6 -6
- package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
- package/dist/chunks/{env-LHRKSLG6.js → env-5DO4YENS.js} +2 -2
- package/dist/chunks/{factory-2H7Z4RWJ.js → factory-3M7D7WJC.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-B2HT5NEO.js} +3 -3
- package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
- package/dist/chunks/{invoice-FXWH5GPO.js → invoice-V7ZTITUO.js} +726 -206
- package/dist/chunks/{meeting-N2FQBHXI.js → meeting-HZOX3CBB.js} +10 -10
- package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
- package/dist/chunks/{reception-MYOKJULO.js → reception-QGPNTGHG.js} +98 -82
- package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
- package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
- package/dist/chunks/{registry-7VZ6YJUF.js → registry-KYPFFQIH.js} +1 -1
- package/dist/chunks/{registry-CKUVBS53.js → registry-SJHSBO5G.js} +10 -10
- package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-5AHR4YQV.js} +4 -4
- package/dist/chunks/{schedule-5IFMCXME.js → schedule-KZPJUPC2.js} +4 -4
- package/dist/chunks/smart-extract-IXHCZE4R.js +2846 -0
- package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-UHKCZJMY.js} +1 -1
- package/dist/index.js +14 -9
- package/dist/shortcuts/contract/host.js +11 -0
- package/dist/shortcuts/contract/index.js +13 -0
- package/dist/shortcuts/contract/manifest.js +204 -0
- package/dist/shortcuts/contract/operations/card-action.js +585 -0
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +315 -0
- package/dist/shortcuts/contract/operations/card-plan.js +327 -0
- package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
- package/dist/shortcuts/contract/operations/elements-build.js +714 -0
- package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
- package/dist/shortcuts/contract/operations/first-screen.js +563 -0
- package/dist/shortcuts/contract/operations/flow.js +81 -25
- package/dist/shortcuts/contract/operations/modeltext.js +132 -0
- package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
- package/dist/shortcuts/contract/operations/performance.js +58 -7
- package/dist/shortcuts/contract/operations/quote.js +410 -22
- package/dist/shortcuts/contract/operations/registry.js +22 -0
- package/dist/shortcuts/contract/operations/review.js +73 -58
- package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
- package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
- package/dist/shortcuts/contract/operations/summary.js +4 -2
- package/dist/shortcuts/contract/operations/upload.js +48 -7
- package/dist/shortcuts/contract/prewarm-cache.js +90 -0
- package/dist/shortcuts/contract/prewarm.js +88 -0
- package/dist/shortcuts/contract/upload-cache.js +49 -4
- package/dist/shortcuts/data/index.js +1 -6
- package/dist/shortcuts/data/manifest.js +2 -2
- package/dist/shortcuts/data/operations/index.js +1 -1
- package/dist/shortcuts/data/operations/query.js +23 -46
- package/dist/shortcuts/fna/host.js +4 -2
- package/dist/shortcuts/fna/manifest.js +14 -5
- package/dist/shortcuts/fna/operations/audit.js +334 -0
- package/dist/shortcuts/fna/operations/registry.js +2 -0
- package/dist/shortcuts/im/operations/at-mention.js +6 -3
- package/dist/shortcuts/im/operations/msg-parse.js +35 -5
- package/dist/shortcuts/im/operations/msg-sync.js +3 -1
- package/dist/shortcuts/im/operations/msg-write.js +57 -9
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/index.js +0 -12
- package/dist/shortcuts/invoice/manifest.js +201 -50
- package/dist/shortcuts/invoice/operations/registry.js +4 -2
- package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
- package/dist/shortcuts/invoice/operations/shared.js +3 -19
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
- package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
- package/dist/shortcuts/reception/constants.js +3 -7
- package/dist/shortcuts/reception/operations/leads.js +30 -6
- package/dist/shortcuts/reception/operations/panels.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
- package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
- package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
- package/dist/shortcuts/recruit-stage/shared.js +5 -0
- package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
- package/dist/shortcuts/smart-extract/constants.js +79 -0
- package/dist/shortcuts/smart-extract/continuation.js +71 -0
- package/dist/shortcuts/smart-extract/errors.js +68 -0
- package/dist/shortcuts/smart-extract/host.js +191 -0
- package/dist/shortcuts/smart-extract/index.js +105 -0
- package/dist/shortcuts/smart-extract/ledger.js +70 -0
- package/dist/shortcuts/smart-extract/manifest.js +35 -0
- package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
- package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
- package/dist/shortcuts/smart-extract/operations/config.js +118 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +489 -0
- package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
- package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
- package/dist/shortcuts/smart-extract/operations/save.js +355 -0
- package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
- package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
- package/dist/shortcuts/smart-extract/operations/target.js +167 -0
- package/dist/shortcuts/smart-extract/operations/types.js +22 -0
- package/dist/shortcuts/smart-extract/operations/validate.js +408 -0
- package/dist/shortcuts/workflow/operations/read.js +77 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +140 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +42 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -6
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +4 -1
- package/docs/agent-invoice.md +5 -7
- package/docs/data.md +5 -1
- package/docs/fna.md +24 -4
- package/docs/invoice.md +7 -5
- package/docs/smart-extract.md +156 -0
- package/package.json +1 -1
- package/skill-template/business-info.json +21 -1
- package/skill-template/domains/qiyecheng.md +6 -2
- package/skill-template/domains/smart-extract.md +16 -0
- package/skill-template/domains/yepiaotong.md +2 -2
- package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +159 -11
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +13 -8
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +44 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +220 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +68 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +26 -15
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +90 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +167 -5
- package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +200 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +572 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
- package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +560 -0
- package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +894 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +93 -0
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +58 -7
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +118 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +42 -3
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +153 -40
- package/skills/weaver-e10-reception-flow/SKILL.md +43 -6
- package/skills/weaver-e10-reception-flow/references/guide.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -40
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
- package/skills/weaver-e10-smart-extract/SKILL.md +169 -0
- package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
- package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +105 -0
- package/skills/weaver-e10-workflow/SKILL.md +2 -1
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +29 -6
- package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +162 -10
- package/skills/weaver-e10-yepiaotong/SKILL.md +53 -35
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +18 -53
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +96 -7
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +5 -38
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +14 -14
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +139 -94
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +131 -58
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
- package/skills/weaver-e10-yimiaoban/SKILL.md +8 -6
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +20 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +7 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +18 -15
- package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
|
@@ -44,6 +44,20 @@ const DEFAULT_AI_MINUTE_PAGE = '1250830691712172036';
|
|
|
44
44
|
function textOf(value) {
|
|
45
45
|
return value === undefined || value === null ? '' : String(value);
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* 系统通知的消息类型(入群 / 改名 / 群公告等居中灰字提示)。
|
|
49
|
+
* ⚠️ 必须按**数字 type** 判定,不能按 `typeName` 中文名判定:上游 2026-11-11 把
|
|
50
|
+
* type=14 的显示名从「通知」改成「居中(灰色字体)」,按名字过滤会静默失效、
|
|
51
|
+
* 把系统提示当成人话塞进纪要。
|
|
52
|
+
*/
|
|
53
|
+
const SYSTEM_NOTICE_TYPES = new Set(['9', '14']);
|
|
54
|
+
const SYSTEM_NOTICE_TYPE_NAMES = new Set(['系统', '通知', '居中']);
|
|
55
|
+
function isSystemNotice(message) {
|
|
56
|
+
const type = textOf(message.type).trim();
|
|
57
|
+
if (type)
|
|
58
|
+
return SYSTEM_NOTICE_TYPES.has(type);
|
|
59
|
+
return SYSTEM_NOTICE_TYPE_NAMES.has(textOf(message.typeName));
|
|
60
|
+
}
|
|
47
61
|
const DAY_MS = 24 * 3600_000;
|
|
48
62
|
/** 解析 E10 的本地时间串;只给日期时补 `00:00:00`,否则会得到 Invalid Date 静默退回默认窗口。 */
|
|
49
63
|
function parseLocalTime(value) {
|
|
@@ -167,7 +181,7 @@ function formatLine(message, nameByUid) {
|
|
|
167
181
|
export function composeTranscript(messages, nameByUid, keepSystem) {
|
|
168
182
|
// ⚠️ im.msg.sync.group 返回是**倒序(新→旧)**,不重排会把纪要时间线写反
|
|
169
183
|
const ordered = [...messages].sort((a, b) => Number(a.msgtime ?? 0) - Number(b.msgtime ?? 0));
|
|
170
|
-
const keptMessages = keepSystem ? ordered : ordered.filter((m) =>
|
|
184
|
+
const keptMessages = keepSystem ? ordered : ordered.filter((m) => !isSystemNotice(m));
|
|
171
185
|
const ignoredSystem = ordered.length - keptMessages.length;
|
|
172
186
|
return {
|
|
173
187
|
transcript: keptMessages.map((message) => formatLine(message, nameByUid)).join('\n'),
|
|
@@ -186,7 +200,7 @@ const DIGEST_PATTERN = /(@|负责|分工|安排|决定|结论|确定|定稿|通
|
|
|
186
200
|
/** 只保留有决策价值的发言,压成摘要版;仍超上限则按行截断。 */
|
|
187
201
|
export function buildDigest(messages, nameByUid, keepSystem, maxChars) {
|
|
188
202
|
const ordered = [...messages].sort((a, b) => Number(a.msgtime ?? 0) - Number(b.msgtime ?? 0));
|
|
189
|
-
const base = keepSystem ? ordered : ordered.filter((m) =>
|
|
203
|
+
const base = keepSystem ? ordered : ordered.filter((m) => !isSystemNotice(m));
|
|
190
204
|
const essence = base.filter((message) => {
|
|
191
205
|
const content = textOf(message.content).trim();
|
|
192
206
|
if (!content)
|
|
@@ -40,13 +40,9 @@ export const LOGISTICS_HINT = [
|
|
|
40
40
|
'伴手礼:如「礼盒每人1份」或「不用」',
|
|
41
41
|
'手机:11 位,只用于行程单显示接待人联系方式(系统不查员工手机号)',
|
|
42
42
|
].join('\n');
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'参观总部环境与展厅,了解公司实力',
|
|
47
|
-
'交流具体项目合作与实施细节',
|
|
48
|
-
'暂未确定,先进待办',
|
|
49
|
-
];
|
|
43
|
+
// 客户需求面板的四个选项已移到 `operations/leads.ts` 的 `buildNeedOptions()`:
|
|
44
|
+
// 第 2 项要按客户类型动态拼(政企 → 数智公文 / 科技 → AI 智能化 / 其余 → 数智业财),
|
|
45
|
+
// 放常量里会与实现脱节——历史上就出现过「SKILL 写动态生成、代码却是固定清单」。
|
|
50
46
|
/**
|
|
51
47
|
* 第 3 问:是否安排会议。
|
|
52
48
|
*
|
|
@@ -208,13 +208,37 @@ export function detectProductIndustry(data = {}, raw = '') {
|
|
|
208
208
|
}
|
|
209
209
|
return { product: '业财', industry };
|
|
210
210
|
}
|
|
211
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* 客户类型 → 解决方案口径:政企 → 数智公文 / 科技公司 → AI 智能化 / 其余 → 数智业财。
|
|
213
|
+
*
|
|
214
|
+
* 政企必须优先判:「某某大数据管理局」含「数据」,先判科技就会推成 AI,口径就错了。
|
|
215
|
+
* 央国企的字号里不会出现「国企」两个字(东方航空、某某电网),所以补一组行业字号;
|
|
216
|
+
* 但不用「集团 / 控股」这种泛词——「某某科技集团」会被误判成公文。
|
|
217
|
+
*/
|
|
218
|
+
export function solutionLabel(data = {}) {
|
|
219
|
+
if (isGovClient(data))
|
|
220
|
+
return '数智公文';
|
|
221
|
+
const name = String(data.customer || '');
|
|
222
|
+
if (/航空|铁路|电力|电网|石油|石化|燃气|水务|烟草|邮政|电信|移动通信|联通|银行|保险|证券/.test(name)) {
|
|
223
|
+
return '数智公文';
|
|
224
|
+
}
|
|
225
|
+
if (/科技|信息技术|网络|软件|互联网|智能|数字|数据/.test(name))
|
|
226
|
+
return 'AI智能化';
|
|
227
|
+
return '数智业财';
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* 需求面板四个选项,第 2 项按客户类型动态拼。
|
|
231
|
+
*
|
|
232
|
+
* 这是**默认值**,不是唯一答案:模型按客户名判断更准时可以改写第 2 项(见 SKILL 面板铁律)。
|
|
233
|
+
* CLI 一定给出完整文案,不会因为模型没替换而把占位符露给用户。
|
|
234
|
+
*/
|
|
212
235
|
export function buildNeedOptions(data = {}) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
236
|
+
return [
|
|
237
|
+
'参观公司总部,了解公司实力',
|
|
238
|
+
`了解泛微产品,与${solutionLabel(data)}解决方案`,
|
|
239
|
+
'推进项目进度,交流实施细节',
|
|
240
|
+
'暂未明确',
|
|
241
|
+
];
|
|
218
242
|
}
|
|
219
243
|
/**
|
|
220
244
|
* 推荐陪访领导:产品线总经理为主,政务加政务群总,技术交流加技术总监,重要客户加副总裁。
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LOGISTICS_FIELDS, LOGISTICS_HINT, LOGISTICS_LABEL, LOGISTICS_PLACEHOLDER, LOGISTICS_TITLE, MEETING_OPTIONS, MEETING_TITLE, } from '../constants.js';
|
|
2
|
+
import { buildNeedOptions } from './leads.js';
|
|
2
3
|
/**
|
|
3
4
|
* 后勤与人数自由文本 → 6 个子项。
|
|
4
5
|
*
|
|
@@ -203,7 +204,7 @@ export function buildPanels(data) {
|
|
|
203
204
|
inputType: 'single',
|
|
204
205
|
required: false,
|
|
205
206
|
allowCustomInput: true,
|
|
206
|
-
options:
|
|
207
|
+
options: buildNeedOptions(data).map((item) => ({ label: item, value: item })),
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
210
|
// 接待细节常驻:原话已经写全了也照出,已识别项进 prefilled,由模型在问之前先说一遍。
|
|
@@ -764,7 +764,9 @@ async function applyCore(args, env, payload) {
|
|
|
764
764
|
const verifyWarnings = verification.mismatches.map((m) => '落库回查不一致:' + m.label + ' 期望 ' + m.expected + ',实际 ' + m.actual + '(该字段可能未写入)');
|
|
765
765
|
const detailUrl = buildCardUrl(ctx.baseUrl, plan.objId, formDataId);
|
|
766
766
|
// 列表链接只打开列表;详情单页由 viewLink 单独给出,不再用「列表+滑出详情」组合地址。
|
|
767
|
-
// 2026-11-10
|
|
767
|
+
// 2026-11-10:装了人才库 ecode 页面就指向「面试进展」页,否则回退原生面试台账列表。
|
|
768
|
+
// 🔴 不在 CLI 内写死任何租户专属页面 id;租户若有固定的「我发起的面试列表」页面,
|
|
769
|
+
// 由技能侧按 recruit-output-links.md 的覆盖规则替换本链接。
|
|
768
770
|
const listLocateUrl = await resolveInterviewListUrlOrNative(ctx.host, ctx.cache, ctx.baseUrl, (ctx.cache.lists?.interview?.listId) || '');
|
|
769
771
|
return rsSuccess('recruit-stage.interview.arrange.apply', {
|
|
770
772
|
mode: 'apply', result: verification.mismatches.length ? 'partial' : 'success', interviewFormId: formDataId,
|
|
@@ -780,7 +782,7 @@ async function applyCore(args, env, payload) {
|
|
|
780
782
|
interviewer: plan.summary.interviewer,
|
|
781
783
|
viewLink: detailUrl ? `[查看 ${plan.cand.name || ''} 的面试安排详情](${detailUrl})` : null,
|
|
782
784
|
listLocateLink: listLocateUrl ? `[打开面试管理列表](${listLocateUrl})` : null,
|
|
783
|
-
agentNote: '产物 = 两个 Markdown 链接(平台实证可点击):① viewLink
|
|
785
|
+
agentNote: '产物 = 两个 Markdown 链接(平台实证可点击):① viewLink 面试安排详情单页(原样搬运,不改)② listLocateLink 面试列表——若技能「固定参数表」配置了本租户的固定页面路由,按 recruit-output-links.md 覆盖规则用固定路由替换 path 段(origin 取自 viewLink),否则原样搬运。按顺序放回答正文,缺哪个只给另一个、不输出半截。不要包 browsertool / <artifact> 标签。',
|
|
784
786
|
aiPlan: plan.isAI && plan.aiPlanPicked ? { id: plan.aiPlanPicked.id, name: plan.aiPlanPicked.name } : undefined,
|
|
785
787
|
saveActions: actionsRun.executed,
|
|
786
788
|
verification: { checked: verification.checked, mismatches: verification.mismatches, unavailable: verification.unavailable || null },
|
|
@@ -841,6 +841,8 @@ async function apply(args, env) {
|
|
|
841
841
|
const created = okByResponse && recordOk;
|
|
842
842
|
const result = !created ? 'failed' : (verification.mismatches.length ? 'partial' : 'success');
|
|
843
843
|
// 列表链接只打开列表;详情单页由 viewLink 单独给出,两者不再合并成一个「列表+滑出详情」地址。
|
|
844
|
+
// 🔴 listId 走环境缓存运行时解析,**不在 CLI 内写死任何租户专属页面 id**(CLI 跨租户共享)。
|
|
845
|
+
// 租户若有固定的「我创建的职位」页面,由技能侧按 recruit-output-links.md 的覆盖规则替换本链接。
|
|
844
846
|
const listUrl = buildListUrl(ctx.baseUrl, (ctx.cache.lists?.position?.listId) || '');
|
|
845
847
|
const cardUrl = buildCardUrl(ctx.baseUrl, jd.objId, formDataId);
|
|
846
848
|
return rsSuccess('recruit-stage.jd.create.apply', {
|
|
@@ -855,10 +857,12 @@ async function apply(args, env) {
|
|
|
855
857
|
positionListUrl: listUrl,
|
|
856
858
|
positionCardUrl: cardUrl,
|
|
857
859
|
positionListLocateUrl: listUrl,
|
|
858
|
-
// 产物链接(Agent
|
|
860
|
+
// 产物链接(Agent 搬运成 Markdown 链接,按顺序:详情在前、列表在后)
|
|
861
|
+
// 🔴 listLocateLink 是 CLI 的**运行时解析结果**;技能若配置了固定页面地址,
|
|
862
|
+
// 由 Agent 按 recruit-output-links.md「链接覆盖规则」替换 path 段后再输出。
|
|
859
863
|
viewLink: cardUrl ? `[查看 ${jd.summary.positionName || '新建职位'} 职位详情](${cardUrl})` : null,
|
|
860
864
|
listLocateLink: listUrl ? `[打开职位列表](${listUrl})` : null,
|
|
861
|
-
agentNote: '查看入口 = 两个 Markdown 链接:① viewLink
|
|
865
|
+
agentNote: '查看入口 = 两个 Markdown 链接:① viewLink 职位详情单页(原样搬运,不改)② listLocateLink 职位列表——若技能「固定参数表」配置了本租户的固定页面路由,按 recruit-output-links.md 覆盖规则用固定路由替换 path 段(origin 取自 viewLink),否则原样搬运。不要包 browsertool / <artifact> 标签;缺哪个只给另一个,不输出半截。链接只是查看入口,重复点击不会重复创建。',
|
|
862
866
|
...jd.summary,
|
|
863
867
|
});
|
|
864
868
|
}
|
|
@@ -239,7 +239,7 @@ async function runList(env, args, feedbackTodoMode) {
|
|
|
239
239
|
await Promise.all([...needFieldIds].map((fieldId) => dsOptionsFor(fieldId)));
|
|
240
240
|
}
|
|
241
241
|
const out = {
|
|
242
|
-
env: new URL(baseUrl).hostname, type, total, totalExact,
|
|
242
|
+
env: new URL(baseUrl).hostname, type, listId, total, totalExact,
|
|
243
243
|
...(totalNote ? { totalNote } : {}),
|
|
244
244
|
...(appliedFilters.length ? { filters: appliedFilters } : {}),
|
|
245
245
|
...(args.recent ? { recentDays: Number(args.recent) } : {}),
|
|
@@ -391,6 +391,195 @@ async function runList(env, args, feedbackTodoMode) {
|
|
|
391
391
|
}
|
|
392
392
|
return out;
|
|
393
393
|
}
|
|
394
|
+
// ── 需求8(2026-11-12):我发起的 AI 面试邀约 ·「到截止时间仍未面试」全局汇总 ──────
|
|
395
|
+
// 🔴 本文件**不写死任何租户专属的页面 id**(CLI 跨租户共享)。
|
|
396
|
+
// 「我发起的面试列表」这类固定页面地址属于部署期常量,由技能侧持有:
|
|
397
|
+
// 调用方通过入参 `listId` 传入,或由 Agent 按 recruit-output-links.md 的覆盖规则替换链接 path 段。
|
|
398
|
+
// 未传 `listId` 时回退到运行时解析的「面试管理」列表 id(`runList` 返回的 `listId`),保证链接始终可用。
|
|
399
|
+
//
|
|
400
|
+
// 🔴 该链接只用于**产出查看入口**,不用于取数:取数始终走已验证的「面试管理」列表通道
|
|
401
|
+
// (`runList type=interview`)+ 客户端按发起人筛选。原因是「我发起的面试列表」的 `cusMenuId` /
|
|
402
|
+
// `formObjId` 未经运行时解析,直接拿它调 getListDatas 可能返回假空。
|
|
403
|
+
/** 发起人字段候选:跨基线列名不同,运行时探测命中第一个有值的,不写死 */
|
|
404
|
+
const INITIATOR_FIELD_CANDIDATES = [
|
|
405
|
+
'arranger', 'create_user', 'create_user_name', 'creator', 'initiator',
|
|
406
|
+
'interview_arranger', 'createUserName', 'recr_principal',
|
|
407
|
+
];
|
|
408
|
+
/**
|
|
409
|
+
* 已参与 / 已终结状态:命中即**不算**「未面试」。
|
|
410
|
+
* 🔴 `待反馈` 必须排除——后端 TO_FEEDBACK 语义是「已答完 + 有录像 + 未填意见」,
|
|
411
|
+
* 属于已参与(见 recruit-list-interview.md §10),漏排会把已完成面试的人误报成未面试。
|
|
412
|
+
* 🔴 `已失效` 同样排除(实测 2026-11-12 环境存在该枚举):邀约已作废,不属于「等候选人来面」。
|
|
413
|
+
* 实测状态枚举(环境 10.12.105.188):未开始 / 待查看 / 待反馈 / 已反馈 / 未参与 / 已失效 / 空。
|
|
414
|
+
*/
|
|
415
|
+
const ATTENDED_STATUS_RE = /已完成|已反馈|待反馈|已面试|已通过|已拒绝|已取消|已作废|已失效|面试中|作答中/;
|
|
416
|
+
function parseInterviewTime(v) {
|
|
417
|
+
const s = String(v ?? '').trim();
|
|
418
|
+
if (!s)
|
|
419
|
+
return null;
|
|
420
|
+
const ts = Date.parse(s.replace(/-/g, '/'));
|
|
421
|
+
return Number.isNaN(ts) ? null : ts;
|
|
422
|
+
}
|
|
423
|
+
function fmtInterviewTime(t) {
|
|
424
|
+
if (t === null)
|
|
425
|
+
return null;
|
|
426
|
+
const d = new Date(t);
|
|
427
|
+
const p = (n) => String(n).padStart(2, '0');
|
|
428
|
+
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* 面试官字段清洗:displayData 常把它留成原始 JSON 串
|
|
432
|
+
* (实测 `[{"name":"","id":"1287565332078542860","type":"employee"}]`,name 还是空的)。
|
|
433
|
+
* 取不到人名时返回 null——按技能纪律不向 HR 展示无意义的 16 位裸 id。
|
|
434
|
+
*/
|
|
435
|
+
function cleanInterviewer(v) {
|
|
436
|
+
const s = String(v ?? '').trim();
|
|
437
|
+
if (!s)
|
|
438
|
+
return null;
|
|
439
|
+
if (s.startsWith('[') || s.startsWith('{')) {
|
|
440
|
+
try {
|
|
441
|
+
const parsed = JSON.parse(s);
|
|
442
|
+
const list = Array.isArray(parsed) ? parsed : [parsed];
|
|
443
|
+
const names = list
|
|
444
|
+
.map((x) => String(x?.name || x?.username || x?.text || x?.title || '').trim())
|
|
445
|
+
.filter(Boolean);
|
|
446
|
+
return names.length ? names.join('、') : null;
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
return s;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return s;
|
|
453
|
+
}
|
|
454
|
+
async function runInterviewNotAttended(env, args) {
|
|
455
|
+
const host = env.host;
|
|
456
|
+
const session = await host.getSession();
|
|
457
|
+
const baseUrl = session.baseUrl.replace(/\/+$/, '');
|
|
458
|
+
const base = await runList(env, {
|
|
459
|
+
type: 'interview',
|
|
460
|
+
all: true,
|
|
461
|
+
pageSize: Number(args.pageSize || 200),
|
|
462
|
+
maxPages: Number(args.maxPages || 5),
|
|
463
|
+
}, false);
|
|
464
|
+
const rows = base.rows || [];
|
|
465
|
+
const scanned = Number(base.scanned ?? rows.length);
|
|
466
|
+
const notes = [];
|
|
467
|
+
const cu = await resolveCurrentUser(host);
|
|
468
|
+
const me = cu ? cu.name : '';
|
|
469
|
+
// ① 发起人字段探测(任一候选在结果集里有值即采用)
|
|
470
|
+
let initiatorField = '';
|
|
471
|
+
for (const cand of INITIATOR_FIELD_CANDIDATES) {
|
|
472
|
+
if (rows.some((r) => String(r?.[cand] ?? '').trim() !== '')) {
|
|
473
|
+
initiatorField = cand;
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
// ② 「我发起的」过滤:解析不到用户或发起人字段时**不静默放大范围**,置空并说明
|
|
478
|
+
const includeAll = Boolean(args.includeAllInitiators);
|
|
479
|
+
let mine = rows;
|
|
480
|
+
if (!includeAll) {
|
|
481
|
+
if (!me) {
|
|
482
|
+
mine = [];
|
|
483
|
+
notes.push('未能解析当前登录用户,无法按「我发起的」过滤,结果为空;如需查看全部 AI 面试邀约请传 includeAllInitiators=true');
|
|
484
|
+
}
|
|
485
|
+
else if (!initiatorField) {
|
|
486
|
+
mine = [];
|
|
487
|
+
notes.push('面试列表未返回可识别的发起人字段(已探测 ' + INITIATOR_FIELD_CANDIDATES.join(' / ') + '),无法按「我发起的」过滤,结果为空;如需查看全部 AI 面试邀约请传 includeAllInitiators=true');
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
mine = rows.filter((r) => String(r[initiatorField] ?? '').includes(me));
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
// ③ 仅 AI 面试邀约
|
|
494
|
+
const tp = (r) => String(r.interview_type_key || r.interview_type || '');
|
|
495
|
+
const ai = mine.filter((r) => /AI\s*面试/i.test(tp(r)));
|
|
496
|
+
// ④ 截止时间已过
|
|
497
|
+
// 🔴 实测(2026-11-12,环境 10.12.105.188):面试管理列表**不返回 end_time**,行内只有
|
|
498
|
+
// start_time。故截止时间按「end_time 优先、缺失回退 start_time」取,并用 deadlineSource
|
|
499
|
+
// 如实标明每条实际用了哪个字段——不谎称拿到了邀约截止时间。
|
|
500
|
+
const parsedLimit = args.deadlineBefore ? parseInterviewTime(args.deadlineBefore) : null;
|
|
501
|
+
if (args.deadlineBefore && parsedLimit === null) {
|
|
502
|
+
throw rsFail('deadlineBefore 无法解析为时间,请用 yyyy-MM-dd HH:mm 或 ISO 格式');
|
|
503
|
+
}
|
|
504
|
+
const limit = parsedLimit === null ? Date.now() : parsedLimit;
|
|
505
|
+
const deadlineOf = (r) => {
|
|
506
|
+
const e = parseInterviewTime(r.end_time);
|
|
507
|
+
if (e !== null)
|
|
508
|
+
return { t: e, src: 'end_time' };
|
|
509
|
+
const s = parseInterviewTime(r.start_time);
|
|
510
|
+
return { t: s, src: s === null ? 'none' : 'start_time' };
|
|
511
|
+
};
|
|
512
|
+
const overdue = ai.filter((r) => {
|
|
513
|
+
const { t } = deadlineOf(r);
|
|
514
|
+
return t !== null && t <= limit;
|
|
515
|
+
});
|
|
516
|
+
// ⑤ 未面试 = 状态未命中「已参与 / 已终结」
|
|
517
|
+
const st = (r) => String(r.union_status_key || r.union_status || '').trim();
|
|
518
|
+
const notAttended = overdue.filter((r) => !ATTENDED_STATUS_RE.test(st(r)));
|
|
519
|
+
// 状态分布:让 HR 能核对判据,也便于发现新枚举值
|
|
520
|
+
const statusBreakdown = {};
|
|
521
|
+
for (const r of overdue) {
|
|
522
|
+
const k = st(r) || '(状态为空)';
|
|
523
|
+
statusBreakdown[k] = (statusBreakdown[k] || 0) + 1;
|
|
524
|
+
}
|
|
525
|
+
const deadlineSourceUsed = [...new Set(overdue.map((r) => deadlineOf(r).src))];
|
|
526
|
+
const slim = (r) => {
|
|
527
|
+
const dl = deadlineOf(r);
|
|
528
|
+
return {
|
|
529
|
+
candidate_name: r.candidate_name || null,
|
|
530
|
+
position_name: r.position_name || null,
|
|
531
|
+
interview_type_key: tp(r) || null,
|
|
532
|
+
interview_session: r.interview_session || null,
|
|
533
|
+
interview_rounds: r.interview_rounds || null,
|
|
534
|
+
start_time: r.start_time || null,
|
|
535
|
+
end_time: r.end_time || null,
|
|
536
|
+
deadline: fmtInterviewTime(dl.t),
|
|
537
|
+
deadlineSource: dl.src,
|
|
538
|
+
union_status_key: st(r) || null,
|
|
539
|
+
subject: r.subject || null,
|
|
540
|
+
interviewer: cleanInterviewer(r.interviewer),
|
|
541
|
+
mobile: r.mobile || null,
|
|
542
|
+
// 🔴 type=interview 的 talent_id 放的是**候选人姓名**不是 id(已知口径,见聚才林
|
|
543
|
+
// recruit-read.md);下游编排一律用 candidate_manage_id / form_data_id,故此处不透传 talent_id。
|
|
544
|
+
candidate_manage_id: r.candidate_manage_id || null,
|
|
545
|
+
form_data_id: r.form_data_id || null,
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
// 截断可见性(强制):面试列表服务端筛选不可用,只能翻页后客户端筛
|
|
549
|
+
const total = base.total;
|
|
550
|
+
if (total !== null && total !== undefined && scanned < Number(total)) {
|
|
551
|
+
notes.push(`本次仅扫描 ${scanned}/${total} 条面试记录,可能仍有未覆盖的邀约;可加大 maxPages 后重查`);
|
|
552
|
+
}
|
|
553
|
+
notes.push('「未面试」判据:AI 面试 + 截止时间已过 + 状态未命中「已完成/已反馈/待反馈/已面试/已通过/已拒绝/已取消/已作废/已失效/面试中」');
|
|
554
|
+
if (deadlineSourceUsed.length && !deadlineSourceUsed.includes('end_time')) {
|
|
555
|
+
notes.push('本环境面试列表不返回邀约截止时间(end_time),已回退用面试开始时间(start_time)判定是否超期,详见每行 deadlineSource');
|
|
556
|
+
}
|
|
557
|
+
notes.push('面试状态由 E10 调度任务定时同步(非实时),刚过截止时间的邀约可能有几分钟延迟,以系统状态为准');
|
|
558
|
+
// 查看链接:优先用调用方(技能)传入的 listId;未传则回退运行时解析的面试管理列表 id
|
|
559
|
+
const resolvedListId = String(args.listId || base.listId || '');
|
|
560
|
+
const listUrl = resolvedListId ? baseUrl + '/sp/ebdfpage/list/' + resolvedListId : null;
|
|
561
|
+
return {
|
|
562
|
+
env: new URL(baseUrl).hostname,
|
|
563
|
+
currentUser: me || null,
|
|
564
|
+
initiatorField: initiatorField || null,
|
|
565
|
+
includeAllInitiators: includeAll,
|
|
566
|
+
scanned,
|
|
567
|
+
deadlineBefore: fmtInterviewTime(limit),
|
|
568
|
+
deadlineSource: deadlineSourceUsed,
|
|
569
|
+
summary: {
|
|
570
|
+
initiatedByMe: includeAll ? rows.length : mine.length,
|
|
571
|
+
aiInterview: ai.length,
|
|
572
|
+
deadlinePassed: overdue.length,
|
|
573
|
+
notAttended: notAttended.length,
|
|
574
|
+
},
|
|
575
|
+
statusBreakdown,
|
|
576
|
+
rows: notAttended.map(slim),
|
|
577
|
+
listUrl,
|
|
578
|
+
listLocateLink: listUrl ? { title: '打开我发起的面试列表', url: listUrl } : null,
|
|
579
|
+
agentNote: '产物 = 统计结论 + 一个 Markdown 链接(listLocateLink)。若技能「固定参数表」配置了本租户的固定页面路由,按 recruit-output-links.md 覆盖规则替换 path 段(origin 取自 listUrl);调用时直接传 listId 更稳。不输出半截链接。',
|
|
580
|
+
note: notes.join(';'),
|
|
581
|
+
};
|
|
582
|
+
}
|
|
394
583
|
const listInput = {
|
|
395
584
|
type: { type: 'string', enum: ['demand', 'position', 'entry', 'offer', 'interview', 'candidate'], description: '列表类型' },
|
|
396
585
|
pageSize: { type: 'integer', minimum: 1, maximum: 200, description: '每页行数(默认 10;feedbackTodo 默认 200)' },
|
|
@@ -428,4 +617,31 @@ export const listOperations = [
|
|
|
428
617
|
}, {}),
|
|
429
618
|
handler: async (args, env) => rsSuccess('recruit-stage.interview.feedbackTodo', await runList(env, { ...args, type: 'interview' }, true)),
|
|
430
619
|
},
|
|
620
|
+
{
|
|
621
|
+
name: 'recruit-stage.interview.notAttended',
|
|
622
|
+
resource: 'recruit.interview',
|
|
623
|
+
method: 'query',
|
|
624
|
+
action: 'interview.notAttended',
|
|
625
|
+
summary: '我发起的 AI 面试邀约中「到截止时间仍未面试」的人员统计(全局汇总提醒):返回未面试人数、截止时间已过的状态分布、人员明细,以及「我发起的面试列表」页面链接',
|
|
626
|
+
capability: 'recruit.interview.notAttended',
|
|
627
|
+
risk: 'read',
|
|
628
|
+
inputSchema: schemaOf({
|
|
629
|
+
pageSize: listInput.pageSize,
|
|
630
|
+
maxPages: listInput.maxPages,
|
|
631
|
+
listId: {
|
|
632
|
+
type: 'string',
|
|
633
|
+
description: '「我发起的面试列表」页面 id,仅用于产出查看链接。不传则回退运行时解析的「面试管理」列表 id。'
|
|
634
|
+
+ 'CLI 内不写死任何租户专属 id:租户固定页面地址由技能侧(SKILL.md 固定参数表)传入',
|
|
635
|
+
},
|
|
636
|
+
deadlineBefore: {
|
|
637
|
+
type: 'string',
|
|
638
|
+
description: '只统计截止时间早于该时刻的邀约(yyyy-MM-dd HH:mm 或 ISO);默认当前时间',
|
|
639
|
+
},
|
|
640
|
+
includeAllInitiators: {
|
|
641
|
+
type: 'boolean',
|
|
642
|
+
description: 'true=不按「我发起的」过滤,统计全部 AI 面试邀约(发起人字段解析不到时的兜底)',
|
|
643
|
+
},
|
|
644
|
+
}, {}),
|
|
645
|
+
handler: async (args, env) => rsSuccess('recruit-stage.interview.notAttended', await runInterviewNotAttended(env, args)),
|
|
646
|
+
},
|
|
431
647
|
];
|