weaver-work-cli 0.1.75 → 0.1.78
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 +3 -1
- package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
- package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
- package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
- package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
- package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-TFOC3Y3X.js} +3 -3
- package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
- package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
- package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
- package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
- package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
- package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
- package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-5VQ7JHV4.js} +134 -49
- package/dist/chunks/{chunk-I6NOHKEK.js → chunk-7SQN5IZR.js} +1 -1
- package/dist/chunks/{chunk-4FCBEWNB.js → chunk-BP7BONZO.js} +675 -86
- package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
- package/dist/chunks/{chunk-PG5YSNYY.js → chunk-DACQKJ6O.js} +3 -3
- package/dist/chunks/{chunk-KWJEICD4.js → chunk-E2EY3DMS.js} +2 -2
- package/dist/chunks/{chunk-KEA4XQPO.js → chunk-FAC4IFGQ.js} +4 -4
- package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
- package/dist/chunks/{minute-doc-OQUMDTKG.js → chunk-IBTGXLOT.js} +101 -18
- package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
- package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
- package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
- package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
- package/dist/chunks/{chunk-2AUFKU2D.js → chunk-SWFTWNWL.js} +11 -11
- package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
- package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
- package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
- package/dist/chunks/{chunk-BSR5TM7U.js → chunk-USYFVIUR.js} +22 -7
- package/dist/chunks/{chunk-ERZY6GYL.js → chunk-UZ2E3VNI.js} +1 -1
- package/dist/chunks/{chunk-NWYHCZTY.js → chunk-VNEU7OUN.js} +1 -1
- package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
- package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/{chunk-QJWVYOOV.js → chunk-Z44YFIN6.js} +2 -2
- package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-ZOTXXGUM.js} +7 -7
- package/dist/chunks/{cli-FULPXIKJ.js → cli-WA7FOQKC.js} +35 -35
- package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
- package/dist/chunks/{conflict-5BKCDV2F.js → conflict-D4GVAURN.js} +2 -2
- package/dist/chunks/{contract-WI23OXVC.js → contract-GW7US3UF.js} +4400 -3548
- package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
- package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-ERDGW3FZ.js} +10 -6
- package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
- package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
- package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-P6T7OAAV.js} +2 -2
- package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-SQU5WTX6.js} +3 -3
- package/dist/chunks/{env-ZAQZ7EHN.js → env-DASBNSEM.js} +2 -2
- package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
- package/dist/chunks/{factory-XRI6KZ7H.js → factory-A3NAKZAA.js} +1 -1
- package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
- package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-7SEAVAJR.js} +3 -3
- package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
- package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
- package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
- package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
- package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
- package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
- package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
- package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
- package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
- package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
- package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-ZDKLS5MR.js} +6 -6
- package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
- package/dist/chunks/{meeting-WC5LD3IO.js → meeting-7AEQGBAT.js} +19 -13
- package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
- package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
- package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
- package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
- package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
- package/dist/chunks/{project-4XVBQ3HX.js → project-6PRGBLO2.js} +39 -15
- package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
- package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TLZJUFHD.js} +544 -464
- package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
- package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
- package/dist/chunks/{registry-NBTBXR4L.js → registry-UVTI323K.js} +12 -11
- package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-ELEJUYBN.js} +4 -4
- package/dist/chunks/{schedule-XOISYUPB.js → schedule-XBKY7VEA.js} +4 -4
- package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
- package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
- package/dist/chunks/{workflow-V54LJPXL.js → workflow-SYCBS5XD.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/internal/update/service.js +9 -8
- package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
- package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
- package/dist/shortcuts/contract/data/report-renderers.js +75 -31
- package/dist/shortcuts/contract/data/report-spec.js +17 -3
- package/dist/shortcuts/contract/manifest.js +20 -3
- package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
- package/dist/shortcuts/contract/operations/collection-node.js +116 -1
- package/dist/shortcuts/contract/operations/compare-report.js +27 -5
- package/dist/shortcuts/contract/operations/credit-page.js +11 -2
- package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
- package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
- package/dist/shortcuts/contract/operations/elements-build.js +162 -30
- package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
- package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
- package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
- package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
- package/dist/shortcuts/contract/operations/ledger.js +88 -16
- package/dist/shortcuts/contract/operations/metrics.js +16 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
- package/dist/shortcuts/contract/operations/page.js +23 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
- package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
- package/dist/shortcuts/contract/operations/review-report.js +11 -3
- package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
- package/dist/shortcuts/contract/operations/triage.js +18 -3
- package/dist/shortcuts/contract/operations/viewlink.js +17 -1
- package/dist/shortcuts/ehr/operations/recruit.js +255 -90
- package/dist/shortcuts/invoice/business-response.js +13 -0
- package/dist/shortcuts/invoice/calendar.js +24 -0
- package/dist/shortcuts/invoice/host.js +26 -15
- package/dist/shortcuts/invoice/index.js +2 -2
- package/dist/shortcuts/invoice/invoice-record.js +7 -2
- package/dist/shortcuts/invoice/manifest.js +179 -155
- package/dist/shortcuts/invoice/operations/get.js +9 -3
- package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
- package/dist/shortcuts/invoice/operations/registry.js +4 -5
- package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
- package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
- package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
- package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
- package/dist/shortcuts/invoice/operations/reim.js +2 -126
- package/dist/shortcuts/invoice/operations/shared.js +15 -17
- package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
- package/dist/shortcuts/invoice/projection.js +14 -0
- package/dist/shortcuts/invoice/read-enrichment.js +123 -0
- package/dist/shortcuts/meeting/confirm-gate.js +42 -0
- package/dist/shortcuts/meeting/continuation.js +6 -2
- package/dist/shortcuts/meeting/minute-doc.js +119 -12
- package/dist/shortcuts/meeting/operations/attachment.js +19 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
- package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
- package/dist/shortcuts/meeting/operations/group-share.js +268 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
- package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
- package/dist/shortcuts/meeting/operations/registry.js +4 -0
- package/dist/shortcuts/project/operations/read.js +40 -15
- package/dist/shortcuts/recruit-stage/context.js +16 -81
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
- package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
- package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
- package/dist/shortcuts/recruit-stage/shared.js +153 -4
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +11 -0
- package/dist/shortcuts/workflow/operations/read.js +24 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
- package/docs/agent-invoice.md +28 -2
- package/docs/invoice.md +60 -9
- package/docs/project.md +1 -1
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
- package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
- package/skills/weaver-e10-meeting/SKILL.md +203 -80
- package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
- package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
- package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
- package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +158 -146
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +64 -51
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +56 -18
- package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +217 -30
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +18 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -20
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +21 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +31 -58
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +2 -2
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +25 -15
- package/skills/weaver-e10-shijingran/SKILL.md +2 -2
- package/skills/weaver-e10-shijingran/references/operations.md +5 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
- package/skills/weaver-e10-workflow/SKILL.md +13 -9
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
- package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
- package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
- package/templates/meeting/minute.docx +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { rsSuccess, schemaOf } from './types.js';
|
|
2
2
|
import { rsFail } from '../errors.js';
|
|
3
|
-
import { randHex32 } from '../shared.js';
|
|
3
|
+
import { randHex32, fetchDatasetRows, detectHiddenFields, hiddenFieldsHint } from '../shared.js';
|
|
4
4
|
import { resolveTags } from '../tag-lookup.js';
|
|
5
5
|
const ID_RE = /^\d+$/;
|
|
6
6
|
// 门户字段内联解析:正常实例 creator 直接返回 [{id,name,...}] / {name} / 字符串 JSON 数组
|
|
@@ -100,16 +100,18 @@ export async function candidateSearchHandler(args, env) {
|
|
|
100
100
|
const talent = cache.lists?.talent;
|
|
101
101
|
const listId = talent?.listId;
|
|
102
102
|
const objId = cache.forms?.talent_pool?.objId;
|
|
103
|
-
if (!
|
|
104
|
-
throw rsFail('
|
|
103
|
+
if (!objId) {
|
|
104
|
+
throw rsFail('当前环境未解析到「人才库」表单,无法搜索人才。请确认 CLI 已登录目标环境且该环境已部署招聘应用(可运行 ehr.recruit.context.resolve 对照检查)。');
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
const
|
|
106
|
+
// 菜单/listId 仅作快路径;缺失时直接按人才表单 objId 读表。
|
|
107
|
+
const directMode = !listId;
|
|
108
|
+
const cusMenuId = talent?.cusMenuId || '';
|
|
109
|
+
const menuName = talent?.menuName || '人才管理';
|
|
108
110
|
const fields = cache.fields[objId] || {};
|
|
109
111
|
// 🔴 2026-11-28:passid/cid 必须用**台账视图 objId**(listInit.data.objid),不是表单 objId。
|
|
110
112
|
// 自用环境两者相同故旧实现未暴露,但其他环境不同,用错会静默查到别的台账数据。
|
|
111
113
|
// 与 searchByTag 共用同一 memo 化解析,首次多 1 个 HTTP,同 listId 后续复用。
|
|
112
|
-
const ledgerObjId = await resolveLedgerObjId(host, String(listId), String(objId));
|
|
114
|
+
const ledgerObjId = directMode ? String(objId) : await resolveLedgerObjId(host, String(listId), String(objId));
|
|
113
115
|
const nameField = 'field_' + (fields.candidate_name || fields.name);
|
|
114
116
|
const mobileField = 'field_' + fields.telephone;
|
|
115
117
|
const name = args.name ? String(args.name) : '';
|
|
@@ -145,20 +147,30 @@ export async function candidateSearchHandler(args, env) {
|
|
|
145
147
|
}
|
|
146
148
|
if (keyword && !name && !mobile) {
|
|
147
149
|
searchType = 'or';
|
|
148
|
-
const meta = await resolveListSearchMeta(host, String(listId));
|
|
149
150
|
const used = [];
|
|
150
151
|
const fellBack = [];
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
if (directMode) {
|
|
153
|
+
// 直读表没有列表搜索元数据:直接按表单字段做客户端包含匹配。
|
|
154
|
+
for (const dk of KEYWORD_TEXT_FIELDS) {
|
|
155
|
+
if (!fields[dk])
|
|
156
|
+
continue;
|
|
157
|
+
used.push({ field: dk, label: dk, operator: 'contains' });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
const meta = await resolveListSearchMeta(host, String(listId));
|
|
162
|
+
for (const dk of KEYWORD_TEXT_FIELDS) {
|
|
163
|
+
const fid = fields[dk];
|
|
164
|
+
if (!fid)
|
|
165
|
+
continue;
|
|
166
|
+
const bare = String(fid);
|
|
167
|
+
const mk = 'field_' + bare;
|
|
168
|
+
const norm = normalizeListOperator(meta.operators[bare]);
|
|
169
|
+
if (norm.fellBack)
|
|
170
|
+
fellBack.push(meta.labels[bare] || dk);
|
|
171
|
+
conds[mk] = [{ [mk]: keyword, [mk + '_condition_type']: norm.op }];
|
|
172
|
+
used.push({ field: dk, label: meta.labels[bare] || dk, operator: norm.op, ...(norm.fellBack ? { operatorFallback: true } : {}) });
|
|
173
|
+
}
|
|
162
174
|
}
|
|
163
175
|
searchFields = used;
|
|
164
176
|
// 🔴 一个字段都没命中时不能静默返回全库:那会让调用方以为"搜到了很多人",
|
|
@@ -177,38 +189,69 @@ export async function candidateSearchHandler(args, env) {
|
|
|
177
189
|
// 改为**客户端按返回行的 createTime 过滤**,并在有该条件时放大取数量,避免筛后不足。
|
|
178
190
|
const wantPageSize = clampPageSize(args.pageSize);
|
|
179
191
|
const fetchPageSize = createdAfter ? Math.min(200, Math.max(wantPageSize * 5, 50)) : wantPageSize;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
192
|
+
let rows = [];
|
|
193
|
+
let total = 0;
|
|
194
|
+
let directTruncated = false;
|
|
195
|
+
if (directMode) {
|
|
196
|
+
// 直读人才表:先取可见行,再按姓名/手机/关键词做客户端过滤。
|
|
197
|
+
const ds = await fetchDatasetRows(host, String(objId), {
|
|
198
|
+
// 直读没有服务端分页:至少取到当前页所需行数,避免 current>1 时切出空页。
|
|
199
|
+
pageSize: Math.min(1000, Math.max(200, fetchPageSize * Math.max(1, Number(args.current || 1)))),
|
|
200
|
+
maxRows: 1000,
|
|
201
|
+
});
|
|
202
|
+
let dsRows = ds.rows;
|
|
203
|
+
const filtered = !!(name || mobile || keyword);
|
|
204
|
+
if (name)
|
|
205
|
+
dsRows = dsRows.filter((r) => String(r.candidate_name || r.name || '').includes(name));
|
|
206
|
+
else if (mobile)
|
|
207
|
+
dsRows = dsRows.filter((r) => String(r.telephone || '').includes(mobile));
|
|
208
|
+
else if (keyword) {
|
|
209
|
+
const keys = KEYWORD_TEXT_FIELDS.filter((dk) => fields[dk]);
|
|
210
|
+
// keys 为空 = 没有任何可用文本字段:跳过过滤(与上方 note「未做关键词过滤、返回全库」一致)。
|
|
211
|
+
// 若仍执行过滤,空 keys 的 some() 恒 false → 静默返回 0 行,与提示自相矛盾。
|
|
212
|
+
if (keys.length)
|
|
213
|
+
dsRows = dsRows.filter((r) => keys.some((dk) => String(r[dk] ?? '').includes(keyword)));
|
|
214
|
+
}
|
|
215
|
+
rows = dsRows;
|
|
216
|
+
directTruncated = ds.truncated;
|
|
217
|
+
// 🔴 直读模式下 ds.total 是「整张表」的总数,不是过滤后的命中数;过滤过就必须用过滤后的行数。
|
|
218
|
+
// 取数触顶时无法知道可见全集,total 置 null,不能拿截断结果冒充全量。
|
|
219
|
+
total = ds.truncated ? null : (filtered ? dsRows.length : (ds.total !== null ? ds.total : dsRows.length));
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
const baseBody = {
|
|
223
|
+
current: Number(args.current || 1),
|
|
224
|
+
pageSize: fetchPageSize,
|
|
225
|
+
tableuid: randHex32(),
|
|
226
|
+
listId,
|
|
227
|
+
searchParamData: { searchType: '3', commonSearchFields: conds, type: searchType },
|
|
228
|
+
terminal: 'PC', browser: 'Chrome',
|
|
229
|
+
requiredMatch: 1, mapResult: 1, recheckQuery: 1,
|
|
230
|
+
isFollow: 0, isShareToMe: 0, filterCondition: {},
|
|
231
|
+
cusMenuId, urlPageTitle: '人才库', menuName,
|
|
232
|
+
};
|
|
233
|
+
const extra = { ebBusinessId: listId };
|
|
234
|
+
const cntBody = { ...baseBody };
|
|
235
|
+
delete cntBody.current;
|
|
236
|
+
delete cntBody.pageSize;
|
|
237
|
+
// 列表 + 计数并行(计数失败用行数兜底)
|
|
238
|
+
const [resp, c] = await Promise.all([
|
|
239
|
+
host.request({
|
|
240
|
+
path: '/api/ebuilder/form/list/getListDatas?passid=' + ledgerObjId + '&cid=' + ledgerObjId,
|
|
241
|
+
body: baseBody, headers: extra,
|
|
242
|
+
}),
|
|
243
|
+
host.request({
|
|
244
|
+
path: '/api/ebuilder/form/list/getListDataCount?passid=' + ledgerObjId + '&cid=' + ledgerObjId,
|
|
245
|
+
body: cntBody, headers: extra,
|
|
246
|
+
}).catch(() => null),
|
|
247
|
+
]);
|
|
248
|
+
const rawRows = resp?.data?.data || [];
|
|
249
|
+
const dispRows = resp?.data?.displayData;
|
|
250
|
+
rows = Array.isArray(dispRows) && dispRows.length ? dispRows : rawRows;
|
|
251
|
+
total = rows.length;
|
|
252
|
+
if (c?.data?.total !== undefined)
|
|
253
|
+
total = c.data.total;
|
|
254
|
+
}
|
|
212
255
|
const statusMap = (cache.options?.recruit_status || {});
|
|
213
256
|
const dictNameMap = {};
|
|
214
257
|
for (const item of cache.dict?.raw || []) {
|
|
@@ -222,6 +265,11 @@ export async function candidateSearchHandler(args, env) {
|
|
|
222
265
|
...(searchFields ? { keyword, searchFields } : {}),
|
|
223
266
|
...(searchNote ? { searchNote } : {}),
|
|
224
267
|
...(keywordIgnored ? { keywordIgnored } : {}),
|
|
268
|
+
...(directTruncated ? {
|
|
269
|
+
truncated: true,
|
|
270
|
+
directScanLimit: 1000,
|
|
271
|
+
note: '无菜单直读模式最多扫描 1000 行,已触顶;结果可能不完整,total 不可作为全库总数。请缩小关键词范围或按姓名/手机精确查询',
|
|
272
|
+
} : {}),
|
|
225
273
|
rows: [],
|
|
226
274
|
};
|
|
227
275
|
const outRows = out.rows;
|
|
@@ -280,6 +328,18 @@ export async function candidateSearchHandler(args, env) {
|
|
|
280
328
|
};
|
|
281
329
|
}
|
|
282
330
|
}
|
|
331
|
+
if (directMode) {
|
|
332
|
+
const start = Math.max(0, (Number(args.current || 1) - 1) * wantPageSize);
|
|
333
|
+
out.rows = out.rows.slice(start, start + wantPageSize);
|
|
334
|
+
out.returned = out.rows.length;
|
|
335
|
+
}
|
|
336
|
+
// ISS-202:字段级权限隐藏 ≠ 空值。整页数据行里完全没出现的 layout 字段,单独提示出来,
|
|
337
|
+
// 避免 AI 把「看不到」当成「候选人没填」。
|
|
338
|
+
const hiddenFields = detectHiddenFields(out.rows, Object.keys(fields));
|
|
339
|
+
if (hiddenFields.length) {
|
|
340
|
+
out.hiddenFields = hiddenFields;
|
|
341
|
+
out.fieldWarnings = [hiddenFieldsHint(hiddenFields)];
|
|
342
|
+
}
|
|
283
343
|
return rsSuccess('recruit-stage.candidate.search', out);
|
|
284
344
|
}
|
|
285
345
|
/* ══════════ recruit-stage.candidate.searchByTag —— 按标签搜人才(2026-11-12 新增) ══════════
|
|
@@ -463,7 +523,7 @@ async function handlerSearchByTag(args, env) {
|
|
|
463
523
|
const listId = talent?.listId;
|
|
464
524
|
const objId = cache.forms?.talent_pool?.objId;
|
|
465
525
|
if (!listId || !objId) {
|
|
466
|
-
throw rsFail('
|
|
526
|
+
throw rsFail('按标签搜索仍依赖人才列表视图 listId;当前账号未解析到该入口。请改用姓名/手机号/关键词的 candidate.search,或由环境配置人才库列表视图。');
|
|
467
527
|
}
|
|
468
528
|
// 入参:tags 支持字符串或数组;别名归一由技能侧负责(CLI 只接规范标签名)
|
|
469
529
|
const wanted = (Array.isArray(args.tags) ? args.tags : [args.tags])
|
|
@@ -473,7 +533,7 @@ async function handlerSearchByTag(args, env) {
|
|
|
473
533
|
const match = args.match === 'all' ? 'all' : 'any';
|
|
474
534
|
const pageSize = clampInt(args.pageSize, 1, 100, 20);
|
|
475
535
|
const current = clampInt(args.current, 1, 10000, 1);
|
|
476
|
-
const maxScan = clampInt(args.maxScan, 100,
|
|
536
|
+
const maxScan = clampInt(args.maxScan, 100, 1000, 500);
|
|
477
537
|
// ① 标签名 → 运行时 tagId(不存在进 missing,不臆造、不改名凑命中)
|
|
478
538
|
const rt = await resolveTags(host, wanted);
|
|
479
539
|
const resolved = rt.resolved || [];
|
|
@@ -698,7 +758,7 @@ export const searchOperations = [
|
|
|
698
758
|
match: { type: 'string', enum: ['any', 'all'], description: '任一命中(默认 any)/ 全部命中(all,走客户端扫描保证交集语义)' },
|
|
699
759
|
pageSize: { type: 'integer', minimum: 1, maximum: 100, description: '返回每页条数,默认 20' },
|
|
700
760
|
current: { type: 'integer', minimum: 1, description: '返回页码,默认 1' },
|
|
701
|
-
maxScan: { type: 'integer', minimum: 100, maximum:
|
|
761
|
+
maxScan: { type: 'integer', minimum: 100, maximum: 1000, description: '标签兜底扫描行数硬上限,默认 500;触顶 truncated=true,不谎报全库命中数' },
|
|
702
762
|
}, { required: ['tags'] }),
|
|
703
763
|
handler: handlerSearchByTag,
|
|
704
764
|
},
|
|
@@ -19,6 +19,119 @@ import { homedir } from 'node:os';
|
|
|
19
19
|
import { join, resolve as resolvePath } from 'node:path';
|
|
20
20
|
import { ehrValidationError } from '../ehr/errors.js';
|
|
21
21
|
import { rsFail } from './errors.js';
|
|
22
|
+
/**
|
|
23
|
+
* 直接按表单 objId 读取台账数据(dataset/v2/getAllData),不依赖菜单/listId。
|
|
24
|
+
* 返回扁平行:mainTable 的 dataKey → fieldValue;行 id → form_data_id。
|
|
25
|
+
*/
|
|
26
|
+
export async function fetchDatasetRows(host, objId, opts = {}) {
|
|
27
|
+
const oid = String(objId || '').trim();
|
|
28
|
+
if (!oid)
|
|
29
|
+
throw rsFail('直接读表失败:缺少表单 objId');
|
|
30
|
+
const pageSize = Math.min(1000, Math.max(1, Number(opts.pageSize || 500)));
|
|
31
|
+
// 业务候选/待办/参考数据只做小范围本地分析;直读上限收口到 1000 行,避免大表扫描拖慢速度。
|
|
32
|
+
const maxRows = Math.min(1000, Math.max(pageSize, Number(opts.maxRows || 1000)));
|
|
33
|
+
const filters = opts.filters || {};
|
|
34
|
+
const rows = [];
|
|
35
|
+
let total = null;
|
|
36
|
+
let pageNo = 1;
|
|
37
|
+
let lastFetchedPage = 0;
|
|
38
|
+
let truncated = false;
|
|
39
|
+
while (rows.length < maxRows) {
|
|
40
|
+
lastFetchedPage = pageNo;
|
|
41
|
+
const r = await host.request({
|
|
42
|
+
method: 'POST',
|
|
43
|
+
path: '/api/ebuilder/form/dataset/v2/getAllData',
|
|
44
|
+
body: {
|
|
45
|
+
datajson: {
|
|
46
|
+
header: { objId: oid },
|
|
47
|
+
mainTable: filters,
|
|
48
|
+
pageInfo: { pageNo, pageSize },
|
|
49
|
+
operationinfo: { isReturnDetail: 'n', fieldNoFindIgnore: 'false' },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
const dj = r?.data?.datajson;
|
|
54
|
+
const datas = dj?.datas;
|
|
55
|
+
if (!Array.isArray(datas)) {
|
|
56
|
+
throw rsFail('直接读表失败:getAllData 未返回数据数组(objId=' + oid + '):' + JSON.stringify(r?.data || {}).slice(0, 200));
|
|
57
|
+
}
|
|
58
|
+
if (typeof dj?.totalCount === 'number')
|
|
59
|
+
total = dj.totalCount;
|
|
60
|
+
else if (typeof dj?.total === 'number')
|
|
61
|
+
total = dj.total;
|
|
62
|
+
for (const item of datas) {
|
|
63
|
+
if (rows.length >= maxRows) {
|
|
64
|
+
truncated = true;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
const mt = item?.mainTable && typeof item.mainTable === 'object' ? item.mainTable : {};
|
|
68
|
+
const flat = {};
|
|
69
|
+
for (const [k, v] of Object.entries(mt)) {
|
|
70
|
+
if (v && typeof v === 'object') {
|
|
71
|
+
const cell = v;
|
|
72
|
+
flat[k] = cell.fieldValue !== undefined ? cell.fieldValue
|
|
73
|
+
: (cell.fieldOptionId !== undefined ? cell.fieldOptionId : cell);
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
flat[k] = v;
|
|
77
|
+
}
|
|
78
|
+
flat.form_data_id = String(flat.id || item?.id || '');
|
|
79
|
+
rows.push(flat);
|
|
80
|
+
}
|
|
81
|
+
if (!datas.length)
|
|
82
|
+
break;
|
|
83
|
+
if (total !== null && rows.length >= total)
|
|
84
|
+
break;
|
|
85
|
+
pageNo += 1;
|
|
86
|
+
}
|
|
87
|
+
if (total !== null && rows.length < total && rows.length >= maxRows)
|
|
88
|
+
truncated = true;
|
|
89
|
+
// 恰好取满 maxRows 且服务端未给总数:多探一页确认是否真的到底。
|
|
90
|
+
// 直接置 truncated 会把「刚好 1000 条」误报为截断;不置又会漏报「超过 1000 条」。
|
|
91
|
+
if (!truncated && total === null && rows.length >= maxRows && lastFetchedPage > 0) {
|
|
92
|
+
try {
|
|
93
|
+
const probe = await host.request({
|
|
94
|
+
method: 'POST',
|
|
95
|
+
path: '/api/ebuilder/form/dataset/v2/getAllData',
|
|
96
|
+
body: {
|
|
97
|
+
datajson: {
|
|
98
|
+
header: { objId: oid },
|
|
99
|
+
mainTable: filters,
|
|
100
|
+
pageInfo: { pageNo: lastFetchedPage + 1, pageSize: 1 },
|
|
101
|
+
operationinfo: { isReturnDetail: 'n', fieldNoFindIgnore: 'false' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
const pd = probe?.data?.datajson?.datas;
|
|
106
|
+
if (Array.isArray(pd) && pd.length > 0)
|
|
107
|
+
truncated = true;
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
truncated = true; // 探测失败按截断处理(保守,宁可提示不可漏数据)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { rows, total, truncated };
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 字段可见性巡检(ISS-202):表单 layout 里声明了字段,但**整页数据行里一次都没出现**该键,
|
|
117
|
+
* 说明它很可能被字段级权限隐藏了——这与「字段值为空」不是一回事,不能当成候选人没填。
|
|
118
|
+
* 判定依据:getAllData 对空值也会返回键(fieldValue 为空串),被权限摘掉的字段则整键缺失。
|
|
119
|
+
* 仅在拿到数据行时判定;无行不判(无从区分)。返回缺失的 dataKey(最多 8 个,避免回执过长)。
|
|
120
|
+
*/
|
|
121
|
+
export function detectHiddenFields(rows, expectedKeys) {
|
|
122
|
+
if (!Array.isArray(rows) || !rows.length)
|
|
123
|
+
return [];
|
|
124
|
+
const seen = new Set();
|
|
125
|
+
for (const row of rows)
|
|
126
|
+
for (const k of Object.keys(row || {}))
|
|
127
|
+
seen.add(k);
|
|
128
|
+
return expectedKeys.filter((k) => k && !seen.has(k)).slice(0, 8);
|
|
129
|
+
}
|
|
130
|
+
/** 字段不可见提示语(统一口径,避免各地自己拼)。 */
|
|
131
|
+
export function hiddenFieldsHint(hidden) {
|
|
132
|
+
return '以下字段在本次返回中完全未出现,可能被字段级权限隐藏(不等同于空值):'
|
|
133
|
+
+ hidden.join('、') + '。引用这些字段做「不满足/未填写」判断前,请先确认当前账号的字段权限。';
|
|
134
|
+
}
|
|
22
135
|
export function randHex32() {
|
|
23
136
|
return randomUUID().replace(/-/g, '');
|
|
24
137
|
}
|
|
@@ -108,16 +221,25 @@ export async function getFormButtons(host, objId, layoutId) {
|
|
|
108
221
|
}
|
|
109
222
|
return actions;
|
|
110
223
|
}
|
|
111
|
-
|
|
224
|
+
/**
|
|
225
|
+
* 保存权限探测(创建/更新共用):拿得到按钮列表但其中没有保存按钮 → denied;
|
|
226
|
+
* 空回包/结构异常/请求失败 → unknown 放行(写入仍由平台校验兜底)。
|
|
227
|
+
* `dataId`:更新场景传目标记录 id,让平台按「该记录的编辑权限」返回按钮;
|
|
228
|
+
* 创建场景留空,按新建表单按钮判定(ISS-203)。
|
|
229
|
+
*/
|
|
230
|
+
export async function probeCreatePermission(host, objId, dataId = '') {
|
|
112
231
|
try {
|
|
232
|
+
const id = String(dataId || '');
|
|
113
233
|
const r = await host.request({
|
|
114
234
|
path: '/api/ebuilder/form/data/getFormButtons',
|
|
115
|
-
body: { layoutType: 'formLayout', objId, dataId:
|
|
235
|
+
body: { layoutType: 'formLayout', objId, dataId: id, formDataId: id, type: '1',
|
|
116
236
|
fromRecycle: false, otherOperator: '', objectAppId: '', browser: 'Chrome', isTamper: '0' },
|
|
117
237
|
});
|
|
118
238
|
const d = r?.data;
|
|
119
239
|
const btns = Array.isArray(d) ? d : (d?.buttons || []);
|
|
120
|
-
//
|
|
240
|
+
// 单表权限判定:只有「确实拿到按钮列表、但其中没有保存按钮」才判 denied。
|
|
241
|
+
// 空回包/结构异常/请求失败属「不可判定」→ unknown 放行,写入时仍由平台校验兜底;
|
|
242
|
+
// 否则一次网络抖动或按钮改名会把 jd.create / resume.import / interview.arrange 全部误拦。
|
|
121
243
|
if (!Array.isArray(btns) || !btns.length)
|
|
122
244
|
return 'unknown';
|
|
123
245
|
const hasSave = btns.some((b) => String(b?.buttonKey || '').toLowerCase().includes('save')
|
|
@@ -977,11 +1099,38 @@ export function computeRequiredHint(opts) {
|
|
|
977
1099
|
/**
|
|
978
1100
|
* EB 记录「卡片单页」URL:{baseUrl}/sp/ebdfpage/card/0/{objId}/{dataId}
|
|
979
1101
|
* objId 来自环境缓存(跨环境不同,不得写死);dataId = saveFormData 返回的记录 id。
|
|
1102
|
+
*
|
|
1103
|
+
* 🔴 2026-11-30(ISS-102):id 必须是字符串。E10 记录 id 是 18~19 位整数,超过 JS 安全整数范围,
|
|
1104
|
+
* 一旦以 number 形态传入(如 JSON.parse 直接吞掉 18 位数字)精度已经丢失,再拼进 URL 就是错地址。
|
|
1105
|
+
* 生成后再把 URL 里的两段反解出来与入参做**逐字全等**校验,拼错/截断一律阻断,不产出可疑链接。
|
|
980
1106
|
*/
|
|
981
1107
|
export function buildCardUrl(baseUrl, objId, dataId) {
|
|
982
1108
|
if (!baseUrl || !objId || !dataId)
|
|
983
1109
|
return null;
|
|
984
|
-
|
|
1110
|
+
const oid = assertLinkId('objId', objId);
|
|
1111
|
+
const did = assertLinkId('dataId', dataId);
|
|
1112
|
+
const url = String(baseUrl).replace(/\/+$/, '') + '/sp/ebdfpage/card/0/' + oid + '/' + did;
|
|
1113
|
+
// 反解校验:URL 里的 id 必须与入参完全一致(防止拼接过程中被截断/转义/替换)
|
|
1114
|
+
const seg = url.slice(url.indexOf('/sp/ebdfpage/card/0/') + '/sp/ebdfpage/card/0/'.length).split('/');
|
|
1115
|
+
if (seg[0] !== oid || seg[1] !== did) {
|
|
1116
|
+
throw rsFail('记录链接生成异常:URL 中的 id 与入参不一致(objId=' + seg[0] + ',dataId=' + seg[1] + '),已阻断,避免给出错地址');
|
|
1117
|
+
}
|
|
1118
|
+
return url;
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* 链接 id 入参校验:拒绝 number(精度已丢)与含路径分隔符/空白的串。
|
|
1122
|
+
* 纯数字长串与测试桩 id 都放行,只拦「明显不可能正确」的形态。
|
|
1123
|
+
*/
|
|
1124
|
+
function assertLinkId(label, value) {
|
|
1125
|
+
if (typeof value === 'number') {
|
|
1126
|
+
throw rsFail(label + ' 以 number 传入(' + String(value) + ')。E10 记录 id 超出 JS 安全整数范围,'
|
|
1127
|
+
+ '数字形态已丢精度,必须按字符串传递,否则会生成错地址。');
|
|
1128
|
+
}
|
|
1129
|
+
const text = String(value ?? '').trim();
|
|
1130
|
+
if (!text || /[\/\\?#\s]/.test(text)) {
|
|
1131
|
+
throw rsFail(label + ' 形态非法(' + JSON.stringify(text) + '),无法生成记录链接');
|
|
1132
|
+
}
|
|
1133
|
+
return text;
|
|
985
1134
|
}
|
|
986
1135
|
// ── 人才库 / 面试列表 / 人才卡片:CLI 只回原生页,EB 壳页由技能侧固定路由覆盖 ─────────────
|
|
987
1136
|
// 🔴 2026-11-29 收口:CLI 不再产出任何 `/sp/custom/ecode/recruit-talent*` 旧地址。
|
|
@@ -31,6 +31,8 @@ export const WORKFLOW_ENDPOINTS = {
|
|
|
31
31
|
HRM_RESOURCE_BROWSER: '/api/hrm/common/browser/complete/resource',
|
|
32
32
|
/** 节点浏览按钮 */
|
|
33
33
|
NODE_BROWSER: '/api/workflow/pathdef/common/browser/data/workflowPathNodeBrowser',
|
|
34
|
+
/** 跨工作流节点树浏览按钮(支持不指定 workflowId 的全局节点检索) */
|
|
35
|
+
NODE_TREE_BROWSER: '/api/workflow/pathdef/common/browser/data/nodeTreeBrowser',
|
|
34
36
|
/** 字段选项浏览按钮 */
|
|
35
37
|
FIELD_OPTION_BROWSER: '/api/workflow/core/common/browser/complete/field_option',
|
|
36
38
|
/** 流程列表查询(带表单字段) */
|
|
@@ -124,6 +124,15 @@ const CREATE_FORM_STDOUT_SAFE_CHARS = 20_000;
|
|
|
124
124
|
* 边界上的表单**提前**落盘;反过来低估才会让宿主按 `MAX_OUTPUT_LEN = 20000` 真截断,那才是要避免的。
|
|
125
125
|
*/
|
|
126
126
|
const DURATION_RESERVE_SENTINEL = 99_999_999;
|
|
127
|
+
/**
|
|
128
|
+
* 小e 环境下 `createForm` 额外下发的填写提示(`data.tips`,字符串数组)。
|
|
129
|
+
*
|
|
130
|
+
* 2026-11-30 用户要求新增:先只放这一条,后续按需追加。**非小e 环境不出现 `tips` 键**
|
|
131
|
+
* —— 那条「没有 id 时用最可能的名称」的口径只服务于小e 的填单链路。
|
|
132
|
+
*/
|
|
133
|
+
const XIAOE_CREATE_FORM_TIPS = [
|
|
134
|
+
'浏览按钮字段:有对象 id 时优先使用「名称(ID)」;没有对象 id 时根据用户描述使用最可能的名称作为字段值。',
|
|
135
|
+
];
|
|
127
136
|
/**
|
|
128
137
|
* `createForm` 超线时的**唯一**回执(2026-10-15 用户裁定,措辞由用户逐字给定)。
|
|
129
138
|
*
|
|
@@ -2489,6 +2498,8 @@ async function buildCreateFormData(workflowId, env, options = {}) {
|
|
|
2489
2498
|
},
|
|
2490
2499
|
systemFieldWarning: minorWarning,
|
|
2491
2500
|
requiredInfoWarning: requiredInfoWarningText(context),
|
|
2501
|
+
// 小e 环境额外下发的填写提示(字符串数组):非小e 不出现该键。
|
|
2502
|
+
...(isXiaoE ? { tips: XIAOE_CREATE_FORM_TIPS } : {}),
|
|
2492
2503
|
// 原 Python 把完整 context 落盘;此处通过 continuation 承载,返回结构保持文档契约。
|
|
2493
2504
|
continuation: token,
|
|
2494
2505
|
},
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { E10_REAUTH_GUIDANCE } from '../../../internal/e10/auth/messages.js';
|
|
11
11
|
import { workflowSuccess, schemaOf, SCHEMA_REQUEST_ID, SCHEMA_CATEGORY, SCHEMA_INDEX, SCHEMA_PAGE_SIZE, } from './types.js';
|
|
12
12
|
import { asString, asInt, asStringArray, asBool, compact, responseData, detailDataOf, toArray, resolveMemoryAppId, withLeadingMeta, STDOUT_SAFE_BYTES, stdoutBytesOf, parseNameWithId, } from './shared.js';
|
|
13
|
+
import { resolveTodoNodeFilter } from './todoSmartConvert/todoSmartConvert.node.js';
|
|
13
14
|
import { workflowValidationError, WorkflowCliError, workflowClarificationError, CLARIFICATION_SUBTYPE, } from '../errors.js';
|
|
14
15
|
import { WORKFLOW_ENDPOINTS } from '../endpoints.js';
|
|
15
16
|
import { flowStatusCondition, FLOW_STATUS_HINT } from './flow-status.js';
|
|
@@ -476,7 +477,14 @@ async function resolveTerm(env, systemKey, rawValue, label, workflowNameMatch) {
|
|
|
476
477
|
return { id: parsed.id, name: parsed.name || text };
|
|
477
478
|
if (systemKey === 'creator' && CREATOR_SELF_TERMS.has(text))
|
|
478
479
|
return null;
|
|
479
|
-
|
|
480
|
+
let candidates = await resolveNameCandidates(env, SYSTEM_FIELDS[systemKey], text);
|
|
481
|
+
if (systemKey === 'workflowid' && workflowNameMatch === 'all' && candidates.length === 0) {
|
|
482
|
+
// 仅原词无命中时尝试用户确认的同义词,保留真实候选名称与后续澄清。
|
|
483
|
+
const synonym = text.includes('评估') ? text.replaceAll('评估', '评审')
|
|
484
|
+
: text.includes('评审') ? text.replaceAll('评审', '评估') : '';
|
|
485
|
+
if (synonym)
|
|
486
|
+
candidates = await resolveNameCandidates(env, SYSTEM_FIELDS[systemKey], synonym);
|
|
487
|
+
}
|
|
480
488
|
const clarificationType = SYSTEM_CLARIFICATION_TYPES[systemKey];
|
|
481
489
|
if (!candidates.length) {
|
|
482
490
|
// 0 命中:只有 --workflow 澄清,其余系统字段一律失败(V11.3 口径)
|
|
@@ -994,6 +1002,9 @@ async function resolveFilterFieldItem(env, raw, fields, workflowLabel, ordinal)
|
|
|
994
1002
|
+ '本次查询已停止。请改用文本/数值/日期/选项类字段。');
|
|
995
1003
|
}
|
|
996
1004
|
export async function buildSearchQuery(env, args, mode, options = {}) {
|
|
1005
|
+
// 节点浏览条件最终只接受 ID;名称在构造标准查询前统一精确解析,禁止退化成工作流名称匹配。
|
|
1006
|
+
const nodeFilter = await resolveTodoNodeFilter(args, env);
|
|
1007
|
+
args = nodeFilter.args;
|
|
997
1008
|
// 1. 原始 JSON 直传(--query-json / --query-file 透传;CLI 侧用 queryJson 字段承载)
|
|
998
1009
|
const rawJson = args.queryJson;
|
|
999
1010
|
let query;
|
|
@@ -1024,9 +1035,10 @@ export async function buildSearchQuery(env, args, mode, options = {}) {
|
|
|
1024
1035
|
}
|
|
1025
1036
|
// 2.5 legacy(低版本模式)恢复 V11.2 语义:todo 未显式指定子分类时默认查「待处理(7)」而非
|
|
1026
1037
|
// 「全部(0)」(来源:Python execute_workflow_search_legacy 的 legacy tab 恢复分支,L12612-12627)。
|
|
1027
|
-
//
|
|
1028
|
-
|
|
1029
|
-
|
|
1038
|
+
// 节点查询默认查全部,显式 subCategory/tabName/tabid 或 queryJson 自带 params.tabid 时保持原值。
|
|
1039
|
+
const hasNodeFilter = !!nodeFilter.resolution || Array.isArray(query.searchParams?.formDatas?.nodeid) &&
|
|
1040
|
+
query.searchParams.formDatas.nodeid.length > 0;
|
|
1041
|
+
if (!hasNodeFilter && asString(args.searchMode) === 'legacy' && category === 'todo' && tabid === DEFAULT_TABID.todo) {
|
|
1030
1042
|
const explicitTab = Boolean(asString(args.subCategory) || asString(args.tabName) ||
|
|
1031
1043
|
(args.tabid !== undefined && String(args.tabid).trim() !== ''));
|
|
1032
1044
|
const rawTabid = query?.params?.tabid;
|
|
@@ -1719,7 +1731,14 @@ const workflowSearch = {
|
|
|
1719
1731
|
requestLevel: { type: 'string', description: '紧急程度名称(CLI 按当前环境等级列表转 ID);纯名称多命中返回澄清候选,0 命中报错并列出可选等级(对齐 V11.3)' },
|
|
1720
1732
|
requestId: { type: 'string', description: '按 requestId 精确过滤,逗号分隔' },
|
|
1721
1733
|
exRequestId: { type: 'string', description: '排除 requestId,逗号分隔' },
|
|
1722
|
-
nodeId: {
|
|
1734
|
+
nodeId: {
|
|
1735
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
1736
|
+
description: '当前节点;支持 ID、节点名称、名称(ID),字符串数组或逗号分隔多值,名称按精确匹配解析全部同名节点定义。',
|
|
1737
|
+
},
|
|
1738
|
+
nodeName: {
|
|
1739
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
1740
|
+
description: '当前节点名称,精确匹配并合并全部同名节点定义;字符串数组或逗号分隔多值。',
|
|
1741
|
+
},
|
|
1723
1742
|
nodeIdTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
1724
1743
|
flowStatus: { type: 'string', description: `流程状态(选项类,多选):${FLOW_STATUS_HINT}` },
|
|
1725
1744
|
flowStatusTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
@@ -14,7 +14,7 @@ import { fetchDetailFacts, stampsOfRows } from './todoSmartConvert.detail.js';
|
|
|
14
14
|
import { GROUP_MIN_ITEMS_FOR_SUBGROUP, isExpiringTodayRow, isOverdueRow, runGroup, } from './todoSmartConvert.group.js';
|
|
15
15
|
import { COLLECT_FILTER_KEYS, COLLECT_ORDER_KEYS, DEFAULT_CATEGORY, DEFAULT_TABID, DEGRADE_TABID, FETCH_PAGE_SIZE, LIST_ENDPOINT_BY_CATEGORY, TIME_FILTER_KEYS, guardListOnlyHost, readBoundedInt, readCategory, readCollectPolicy, readPageSize, rowFromAny, totalEndpointFor, } from './todoSmartConvert.core.js';
|
|
16
16
|
const DEFAULT_REQUEST_SUMMARY_MAX = 50;
|
|
17
|
-
export async function collectRawTodos(args, env) {
|
|
17
|
+
export async function collectRawTodos(args, env, nodeResolution) {
|
|
18
18
|
const category = readCategory(args.category);
|
|
19
19
|
// 摘要按规则保留原始字段;普通查询还需保留一级优先组使用的原始截止时间。
|
|
20
20
|
const priorityFields = priorityRuleFields();
|
|
@@ -52,7 +52,7 @@ export async function collectRawTodos(args, env) {
|
|
|
52
52
|
if (!explicitTab)
|
|
53
53
|
searchArgs.tabid = DEFAULT_TABID;
|
|
54
54
|
const warnings = [];
|
|
55
|
-
if (searchArgs.isremarks === undefined) {
|
|
55
|
+
if (searchArgs.isremarks === undefined && !nodeResolution) {
|
|
56
56
|
const defaultIsremarks = generalRules()?.identityFilter?.defaultIsremarks?.trim();
|
|
57
57
|
if (defaultIsremarks) {
|
|
58
58
|
searchArgs.isremarks = defaultIsremarks;
|
|
@@ -187,9 +187,11 @@ export const ALLOWED_INPUT_KEYS = [
|
|
|
187
187
|
'limit',
|
|
188
188
|
'pageSize',
|
|
189
189
|
'category',
|
|
190
|
+
'subordinateName',
|
|
190
191
|
// originData(2026-11-24 用户定稿):摘要链路把 collect 各页 getTodoListData 原始响应体透出,
|
|
191
192
|
// 由 skill 的 tools 脚本落盘 <skill>/originData/,产物 data 里以 originDataId 引用。
|
|
192
193
|
'originData',
|
|
194
|
+
'nodeName',
|
|
193
195
|
...COLLECT_FILTER_KEYS,
|
|
194
196
|
...COLLECT_ORDER_KEYS,
|
|
195
197
|
// smartGroupAdd(2026-11-13):产物落库字段,与 E10 WflSmartGroupAddParamsDto 同名
|
|
@@ -5,6 +5,8 @@ import { planTodoOutput } from './todoOutputPlanner.js';
|
|
|
5
5
|
import { assertKnownKeys, buildSkillTiming, CATEGORY_VALUES, DEFAULT_CATEGORY, DEFAULT_TOP_N, FETCH_PAGE_SIZE, GROUP_BY_VALUES, OUTPUT_MODE_VALUES, readOutputMode, STAGE_VALUES, workflowSuccess, } from './todoSmartConvert.core.js';
|
|
6
6
|
import { collectRawTodos } from './todoSmartConvert.collect.js';
|
|
7
7
|
import { prepareTodoQuery } from './todoSmartConvert.prepareQuery.js';
|
|
8
|
+
import { resolveTodoSubordinate, scopeTodoSubordinate } from './todoSmartConvert.subordinate.js';
|
|
9
|
+
import { resolveTodoNodeFilter } from './todoSmartConvert.node.js';
|
|
8
10
|
import { enrichWorkflowClarification } from './workflowClarification.js';
|
|
9
11
|
import { runSmartConvert } from './todoSmartConvert.aggregate.js';
|
|
10
12
|
import { runGroup } from './todoSmartConvert.group.js';
|
|
@@ -97,6 +99,7 @@ const inputSchema = schemaOf({
|
|
|
97
99
|
description: '废弃兼容参数;页大小由 limit 推导,传入值只产生 warning。',
|
|
98
100
|
},
|
|
99
101
|
category: { type: 'string', enum: [...CATEGORY_VALUES], default: DEFAULT_CATEGORY },
|
|
102
|
+
subordinateName: { type: 'string', description: '仅普通待办 prepareQuery:直属下属完整姓名,重名确认后使用「姓名(ID)」。' },
|
|
100
103
|
tabid: { type: 'string' },
|
|
101
104
|
tabName: { type: 'string' },
|
|
102
105
|
subCategory: { type: 'string' },
|
|
@@ -120,7 +123,14 @@ const inputSchema = schemaOf({
|
|
|
120
123
|
requestLevel: { type: 'string', description: '紧急程度名称(CLI 按当前环境等级列表转 ID);0 命中报错并列出可选等级' },
|
|
121
124
|
requestId: { type: 'string', description: '按 requestId 精确过滤,逗号分隔' },
|
|
122
125
|
exRequestId: { type: 'string', description: '排除 requestId,逗号分隔' },
|
|
123
|
-
nodeId: {
|
|
126
|
+
nodeId: {
|
|
127
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
128
|
+
description: '当前节点;支持 ID、节点名称、名称(ID),字符串数组或逗号分隔多值,名称按精确匹配解析全部同名节点定义。',
|
|
129
|
+
},
|
|
130
|
+
nodeName: {
|
|
131
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
132
|
+
description: '当前节点名称,精确匹配并合并全部同名节点定义;字符串数组或逗号分隔多值。',
|
|
133
|
+
},
|
|
124
134
|
nodeIdTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
125
135
|
flowStatus: { type: 'string', description: `流程状态(选项类,多选):${FLOW_STATUS_HINT}` },
|
|
126
136
|
flowStatusTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
@@ -203,6 +213,10 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
203
213
|
const stage = args.stage === undefined || args.stage === null || args.stage === ''
|
|
204
214
|
? inferStage(args)
|
|
205
215
|
: readStage(args.stage);
|
|
216
|
+
if (args.subordinateName !== undefined && (stage !== 'prepareQuery' || outputMode === 'summary'
|
|
217
|
+
|| (args.category !== undefined && args.category !== DEFAULT_CATEGORY))) {
|
|
218
|
+
throw workflowValidationError('subordinate_query_only', '下属待办仅支持普通待办查询');
|
|
219
|
+
}
|
|
206
220
|
const hasItems = Array.isArray(args.items);
|
|
207
221
|
const resumed = stage === 'collect' && hasItems;
|
|
208
222
|
/**
|
|
@@ -229,12 +243,19 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
229
243
|
};
|
|
230
244
|
};
|
|
231
245
|
if (stage === 'prepareQuery') {
|
|
246
|
+
const subordinate = args.subordinateName === undefined ? undefined : await resolveTodoSubordinate(args.subordinateName, env);
|
|
247
|
+
const queryEnv = subordinate ? scopeTodoSubordinate(env, subordinate) : env;
|
|
232
248
|
try {
|
|
233
|
-
const
|
|
249
|
+
const nodeFilter = await resolveTodoNodeFilter(args, queryEnv);
|
|
250
|
+
const result = await prepareTodoQuery(nodeFilter.args, queryEnv, nodeFilter.resolution);
|
|
251
|
+
if (subordinate) {
|
|
252
|
+
result.query.subordinateId = subordinate.id;
|
|
253
|
+
result.query.subordinateName = subordinate.name;
|
|
254
|
+
}
|
|
234
255
|
return finish(env, args, startedAt, stage, result, { branch: 'todo-query', stage }, result.warnings);
|
|
235
256
|
}
|
|
236
257
|
catch (error) {
|
|
237
|
-
throw await enrichWorkflowClarification(error, args,
|
|
258
|
+
throw await enrichWorkflowClarification(error, args, queryEnv);
|
|
238
259
|
}
|
|
239
260
|
}
|
|
240
261
|
if (stage === 'view') {
|
|
@@ -355,7 +376,10 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
355
376
|
if (stage === 'collect' || !hasItems) {
|
|
356
377
|
let result;
|
|
357
378
|
try {
|
|
358
|
-
|
|
379
|
+
const nodeFilter = await resolveTodoNodeFilter(args, env);
|
|
380
|
+
result = await collectRawTodos(nodeFilter.args, env, nodeFilter.resolution);
|
|
381
|
+
if (nodeFilter.resolution)
|
|
382
|
+
Object.assign(result, { nodeResolution: nodeFilter.resolution });
|
|
359
383
|
}
|
|
360
384
|
catch (error) {
|
|
361
385
|
throw await enrichWorkflowClarification(error, args, env);
|