weaver-work-cli 0.1.61 → 0.1.63
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/dist/chunks/{archive-S2VKZWQ3.js → archive-BLDYBZDX.js} +5 -4
- package/dist/chunks/{archive-oa-HEDSIUUY.js → archive-oa-3GJ3TWXR.js} +5 -4
- package/dist/chunks/{asset-HYH4W357.js → asset-AFXJN4CK.js} +5 -4
- package/dist/chunks/{asset-idle-N7REBNGL.js → asset-idle-VUJXWGWJ.js} +5 -4
- package/dist/chunks/{attachment-content-VYYA75FR.js → attachment-content-VMJA7NSQ.js} +3 -3
- package/dist/chunks/{blog-SLMZZICV.js → blog-EREB35VU.js} +5 -4
- package/dist/chunks/{caizhilian-RV43KKBT.js → caizhilian-ATM2JO5S.js} +5 -5
- package/dist/chunks/{calendar-DMVZ4OLY.js → calendar-E26ZIH7S.js} +5 -4
- package/dist/chunks/{chunk-6XSSAUNW.js → chunk-4OB22YKE.js} +48 -12
- package/dist/chunks/{chunk-UBGWIXU3.js → chunk-5CY37VLS.js} +131 -38
- package/dist/chunks/{chunk-EGANE35F.js → chunk-6G2JARDK.js} +1 -1
- package/dist/chunks/{chunk-WIWDVETN.js → chunk-6VCQLZXE.js} +75 -76
- package/dist/chunks/{chunk-E5YD5JWR.js → chunk-BY3WDJO5.js} +1 -1
- package/dist/chunks/{chunk-IW7A2IQY.js → chunk-C4YQJFZV.js} +43 -15
- package/dist/chunks/{chunk-BQYX2UX5.js → chunk-C5PIGPGX.js} +5 -3
- package/dist/chunks/{chunk-UBRWONP4.js → chunk-EOZHSNND.js} +2 -2
- package/dist/chunks/{chunk-UQFPF4EX.js → chunk-G3ZM57PD.js} +2 -2
- package/dist/chunks/{chunk-XT77MP54.js → chunk-GOBNIGWS.js} +410 -24
- package/dist/chunks/{chunk-KY3R42RS.js → chunk-GQK6WLOS.js} +5 -3
- package/dist/chunks/{chunk-BIA2NKUG.js → chunk-HEJPVXD3.js} +5 -5
- package/dist/chunks/{chunk-ILALC2N6.js → chunk-I4C2KR2G.js} +1 -1
- package/dist/chunks/{chunk-YI2YMW5N.js → chunk-IGICM3WJ.js} +2 -2
- package/dist/chunks/chunk-IN6NXQ26.js +680 -0
- package/dist/chunks/{chunk-VBFBMM7G.js → chunk-LOVAIGM2.js} +387 -70
- package/dist/chunks/{chunk-H6YOMI3U.js → chunk-OMAGCLUE.js} +5 -3
- package/dist/chunks/{chunk-VNYOUAWV.js → chunk-QAMIIFP6.js} +11 -11
- package/dist/chunks/{chunk-QBDXJS2W.js → chunk-QZYKZ7MQ.js} +16 -8
- package/dist/chunks/{chunk-V2LASYKO.js → chunk-RR45ELVE.js} +30 -24
- package/dist/chunks/{chunk-NRYDJN4J.js → chunk-RV2JAA5I.js} +89 -8
- package/dist/chunks/{chunk-TEZHIB6T.js → chunk-SDPC7BG2.js} +5 -3
- package/dist/chunks/{chunk-T2KVJFWJ.js → chunk-SHBDXEUE.js} +4 -7
- package/dist/chunks/{chunk-P6TXQK75.js → chunk-THMBDCRA.js} +5 -3
- package/dist/chunks/chunk-TJN4PIYO.js +47 -0
- package/dist/chunks/{chunk-DTCQFTHW.js → chunk-TNFIUZ4H.js} +3 -3
- package/dist/chunks/{chunk-JFAWZX53.js → chunk-UPVAQJKS.js} +282 -131
- package/dist/chunks/{chunk-KXJA42EA.js → chunk-WPBZQVLS.js} +1 -1
- package/dist/chunks/{conflict-GFJRS6I7.js → conflict-AMNTM3FV.js} +2 -2
- package/dist/chunks/{contract-U3ZGNRWB.js → contract-PLO2V2NO.js} +2333 -4426
- package/dist/chunks/{cowork-EX7PKIDK.js → cowork-FZAXE6FO.js} +5 -4
- package/dist/chunks/{create-flow-EJZD434E.js → create-flow-2DAUN7HU.js} +16 -6
- package/dist/chunks/{data-FOODGAMF.js → data-7NXMWET4.js} +3 -3
- package/dist/chunks/{ebuilder-form-I2EOKODG.js → ebuilder-form-DEYHX6M7.js} +4 -4
- package/dist/chunks/{ehr-TE4RFNID.js → ehr-QQH2DYYA.js} +244 -151
- package/dist/chunks/{employee-DR5Y64TI.js → employee-PGMY6NI6.js} +1 -1
- package/dist/chunks/{entry-mode-ZOLSXEGX.js → entry-mode-2JTVEKMP.js} +3 -3
- package/dist/chunks/{env-TID5NFR6.js → env-2JZMXC6I.js} +2 -2
- package/dist/chunks/{esb-7L6MHYLB.js → esb-I5ZFHJUK.js} +8 -8
- package/dist/chunks/{factory-OG7BPMH5.js → factory-XIATYHU6.js} +1 -1
- package/dist/chunks/{fna-6V2ENR3Y.js → fna-3V2TL6B2.js} +5 -4
- package/dist/chunks/{group-chat-5DKPWIHL.js → group-chat-CVYUZCOQ.js} +3 -3
- package/dist/chunks/{host-TJ5VVHM7.js → host-4DP7C7YQ.js} +4 -4
- package/dist/chunks/{host-3DLYA54R.js → host-4KQCAEWA.js} +4 -4
- package/dist/chunks/{host-ONZC6AE7.js → host-4X2F3JPQ.js} +4 -4
- package/dist/chunks/{host-OGBHL75G.js → host-BD7NAM33.js} +4 -4
- package/dist/chunks/{host-VTPAWDZV.js → host-CBONEAZS.js} +4 -4
- package/dist/chunks/{host-GOJHHTPY.js → host-L37QVNIV.js} +4 -4
- package/dist/chunks/{hrm-2N7NFQDZ.js → hrm-OL3IKN7C.js} +6 -6
- package/dist/chunks/{im-XCH47ZBN.js → im-YXQWUF3R.js} +4 -4
- package/dist/chunks/{invoice-XQRKMGNY.js → invoice-4WY32PR2.js} +199 -332
- package/dist/chunks/{jiuchuanhui-PL6DRPBM.js → jiuchuanhui-L6SHLONH.js} +5 -4
- package/dist/chunks/{lazy-dispatch-UATEN7H7.js → lazy-dispatch-OYE6QV24.js} +5 -5
- package/dist/chunks/{mail-Q7Z4CQ4D.js → mail-PZV2KNRU.js} +5 -4
- package/dist/chunks/{meeting-5E3BNARL.js → meeting-6SOBCC6N.js} +16 -15
- package/dist/chunks/{minute-doc-NXRE5C77.js → minute-doc-KSJSJNOH.js} +4 -4
- package/dist/chunks/{okr-3O3XNYOK.js → okr-B76FW5M2.js} +5 -4
- package/dist/chunks/{operations-EZWG72FH.js → operations-YOMEGFLV.js} +5 -5
- package/dist/chunks/{performance-Y7CPNSOR.js → performance-4VBKUPFO.js} +5 -4
- package/dist/chunks/{plan-BLGPZF5M.js → plan-HBNZRQTI.js} +5 -4
- package/dist/chunks/{project-6MZMLJMP.js → project-IV6FWK74.js} +5 -4
- package/dist/chunks/{reception-F2VT2X52.js → reception-BR5YURT6.js} +3 -3
- package/dist/chunks/{recruit-stage-4ETIBMIW.js → recruit-stage-4HQ6OGXT.js} +654 -336
- package/dist/chunks/{registry-I4DVPDMU.js → registry-7LICMV5J.js} +12 -12
- package/dist/chunks/{registry-3FYSWV3U.js → registry-JFQEFC7E.js} +3 -3
- package/dist/chunks/{registry-3UGIWH53.js → registry-JMNOXRST.js} +2 -2
- package/dist/chunks/{registry-7RS74TCK.js → registry-MZJQX65Q.js} +5 -5
- package/dist/chunks/{room-recommend-GWCVKCXW.js → room-recommend-43GLLE7Y.js} +4 -4
- package/dist/chunks/{schedule-6AN63MJQ.js → schedule-ZQ42BEW6.js} +4 -4
- package/dist/chunks/{smart-extract-SR4SJJKN.js → smart-extract-QKAEAZGM.js} +3 -3
- package/dist/chunks/{workflow-KF7FA2UQ.js → workflow-6HV7H5PC.js} +10 -7
- package/dist/index.js +34 -34
- package/dist/internal/e10/auth/commands.js +21 -1
- package/dist/internal/e10/auth/xiaoe.js +6 -2
- package/dist/internal/e10/auth-recovery.js +28 -2
- package/dist/internal/e10/request-runtime.js +15 -3
- package/dist/internal/e10/request-trace.js +65 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +149 -0
- package/dist/shortcuts/contract/index.js +14 -39
- package/dist/shortcuts/contract/manifest.js +115 -270
- package/dist/shortcuts/contract/operations/compare-report.js +437 -0
- package/dist/shortcuts/contract/operations/compare.js +2 -0
- package/dist/shortcuts/contract/operations/first-screen.js +96 -207
- package/dist/shortcuts/contract/operations/flow.js +19 -1
- package/dist/shortcuts/contract/operations/{card-ebdf-list.js → ledger-card.js} +98 -25
- package/dist/shortcuts/contract/operations/ledger.js +315 -1
- package/dist/shortcuts/contract/operations/metrics.js +93 -0
- package/dist/shortcuts/contract/operations/modeltext.js +3 -3
- package/dist/shortcuts/contract/operations/page.js +8 -4
- package/dist/shortcuts/contract/operations/performance.js +53 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +289 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +264 -0
- package/dist/shortcuts/contract/operations/recommend.js +42 -1
- package/dist/shortcuts/contract/operations/registry.js +16 -23
- package/dist/shortcuts/contract/operations/{card-risk-report.js → review-report.js} +24 -114
- package/dist/shortcuts/contract/operations/review.js +33 -167
- package/dist/shortcuts/contract/operations/save-recognize.js +173 -43
- package/dist/shortcuts/contract/operations/triage.js +13 -6
- package/dist/shortcuts/contract/operations/{template.js → type-clause-read.js} +10 -25
- package/dist/shortcuts/contract/operations/upload.js +17 -11
- package/dist/shortcuts/contract/prewarm-cache.js +6 -2
- package/dist/shortcuts/contract/prewarm.js +33 -23
- package/dist/shortcuts/contract/recommend-cache.js +191 -0
- package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +85 -62
- package/dist/shortcuts/ehr/operations/recruit-position.js +21 -13
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +59 -0
- package/dist/shortcuts/ehr/operations/recruit-tag.js +17 -11
- package/dist/shortcuts/ehr/operations/recruit-write.js +118 -70
- package/dist/shortcuts/ehr/operations/recruit.js +338 -121
- package/dist/shortcuts/hrm/operations/employee.js +64 -17
- package/dist/shortcuts/hrm/operations/resolve.js +419 -369
- package/dist/shortcuts/im/host.js +38 -22
- package/dist/shortcuts/invoice/manifest.js +30 -62
- package/dist/shortcuts/invoice/operations/registry.js +2 -2
- package/dist/shortcuts/invoice/operations/reim-customer.js +111 -0
- package/dist/shortcuts/invoice/operations/shared.js +0 -204
- package/dist/shortcuts/meeting/operations/eb/conflict.js +60 -2
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +116 -7
- package/dist/shortcuts/meeting/operations/eb/create-form-link.js +380 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +1 -3
- package/dist/shortcuts/recruit-stage/batch-store.js +44 -0
- package/dist/shortcuts/recruit-stage/context.js +75 -9
- package/dist/shortcuts/recruit-stage/manifest.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -22
- package/dist/shortcuts/recruit-stage/operations/list.js +187 -37
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +231 -313
- package/dist/shortcuts/recruit-stage/operations/search.js +5 -5
- package/dist/shortcuts/recruit-stage/operations/tag.js +286 -0
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +12 -15
- package/dist/shortcuts/workflow/operations/read.js +8 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +7 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -3
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +33 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +153 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +232 -0
- package/dist/shortcuts/workflow/operations.js +5 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/contract.md +2 -2
- package/docs/e10-auth.md +28 -0
- package/docs/ehr.md +1 -1
- package/docs/invoice.md +0 -2
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +0 -1
- package/skills/weaver-e10-hrm/SKILL.md +3 -3
- package/skills/weaver-e10-hrm/references/employee.md +13 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +237 -347
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -14
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +109 -185
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +12 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +28 -20
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +12 -17
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +7 -13
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +10 -18
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +18 -17
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +114 -61
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +8 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +73 -104
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +32 -37
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +12 -10
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +70 -82
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +37 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +94 -27
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +9 -15
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +9 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +59 -32
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +7 -5
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +21 -13
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +13 -13
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +6 -5
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +250 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +11 -20
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +203 -54
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +4 -11
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +5 -11
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +56 -7
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +10 -16
- package/skills/weaver-e10-jinchengda/references/orchestration.md +31 -33
- package/skills/weaver-e10-jucailin/SKILL.md +6 -7
- package/skills/weaver-e10-jucailin/agents/openai.yaml +52 -0
- package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +8 -6
- package/skills/weaver-e10-jucailin/references/recruit-read.md +4 -0
- package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -4
- package/skills/weaver-e10-meeting/SKILL.md +83 -531
- package/skills/weaver-e10-meeting/references/commands-table.md +61 -0
- package/skills/weaver-e10-meeting/references/create-commands.md +136 -0
- package/skills/weaver-e10-meeting/references/create-flow.md +3 -1
- package/skills/weaver-e10-meeting/references/create-guardrails.md +14 -8
- package/skills/weaver-e10-meeting/references/custom-fields.md +40 -0
- package/skills/weaver-e10-meeting/references/eb-contracts.md +60 -0
- package/skills/weaver-e10-meeting/references/invitation.md +69 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +119 -0
- package/skills/weaver-e10-meeting/references/pitfalls.md +1 -1
- package/skills/weaver-e10-meeting/references/room-recommend.md +88 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +317 -266
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +22 -27
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +30 -27
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +2 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +12 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +23 -19
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +18 -16
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +25 -23
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +11 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +150 -85
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +14 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +173 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-taxonomy.json +76 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
- package/skills/weaver-e10-workflow/SKILL.md +49 -32
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +67 -34
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +65 -51
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +18 -11
- package/skills/weaver-e10-workflow/references/workflow-create.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -37
- package/skills/weaver-e10-workflow/references/workflow-query.md +25 -22
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +318 -110
- package/skills/weaver-e10-yepiaotong/SKILL.md +16 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +9 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +15 -11
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +29 -25
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +89 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +35 -37
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +66 -63
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +50 -71
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +34 -95
- package/skills/weaver-e10-yimiaoban/SKILL.md +10 -10
- package/skills/weaver-e10-yimiaoban/references/person.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
- package/dist/chunks/chunk-6QYNE6HE.js +0 -658
- package/dist/chunks/chunk-SHYQUBY3.js +0 -48
- package/dist/shortcuts/contract/operations/card-action.js +0 -1266
- package/dist/shortcuts/contract/operations/card-plan.js +0 -393
- package/dist/shortcuts/contract/operations/card.js +0 -232
- package/dist/shortcuts/contract/operations/compare-screen.js +0 -378
- package/dist/shortcuts/contract/operations/quote-to-contract.js +0 -495
- package/dist/shortcuts/contract/operations/quotescreen.js +0 -529
- package/dist/shortcuts/contract/operations/summary-validate.js +0 -293
- package/dist/shortcuts/contract/operations/summary.js +0 -187
- package/dist/shortcuts/ehr/recruit-stage/batch-store.js +0 -78
- package/dist/shortcuts/ehr/recruit-stage/context.js +0 -231
- package/dist/shortcuts/ehr/recruit-stage/continuation.js +0 -74
- package/dist/shortcuts/ehr/recruit-stage/errors.js +0 -65
- package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +0 -165
- package/dist/shortcuts/ehr/recruit-stage/host.js +0 -109
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +0 -1065
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +0 -295
- package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +0 -961
- package/dist/shortcuts/ehr/recruit-stage/operations/list.js +0 -431
- package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +0 -50
- package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +0 -1655
- package/dist/shortcuts/ehr/recruit-stage/operations/search.js +0 -158
- package/dist/shortcuts/ehr/recruit-stage/operations/types.js +0 -34
- package/dist/shortcuts/ehr/recruit-stage/runtime.js +0 -31
- package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +0 -318
- package/dist/shortcuts/ehr/recruit-stage/shared.js +0 -887
- package/dist/shortcuts/invoice/operations/browse-field.js +0 -17
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +0 -22
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +0 -554
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +0 -279
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +0 -483
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -46
- package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +0 -194
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +0 -204
|
@@ -2,6 +2,7 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { basename, join } from 'node:path';
|
|
4
4
|
import { contractValidationError } from '../errors.js';
|
|
5
|
+
import { ALIASES, LEDGER_VIEW_KEYS, MENU_PAGES } from './ledger-card.js';
|
|
5
6
|
/**
|
|
6
7
|
* 台账数据处理的本地 operation(2026-11-13 从 scripts/ledger_aggregate.py 与
|
|
7
8
|
* scripts/ledger_guard.py 迁移,遵守「能力下沉 CLI」规范)。
|
|
@@ -165,7 +166,7 @@ function buildFallbackCard(menu, comParams, origin) {
|
|
|
165
166
|
variant: info.variant,
|
|
166
167
|
viewKey: info.viewKey,
|
|
167
168
|
pageId: info.pageId,
|
|
168
|
-
command: 'weaver-work-cli --json contract run contract.card
|
|
169
|
+
command: 'weaver-work-cli --json contract run contract.ledger.card --input <args.json>',
|
|
169
170
|
args,
|
|
170
171
|
note,
|
|
171
172
|
usage: '把 args 写入 UTF-8 JSON 文件后执行上面 command,输出即 <browsertool> 卡片',
|
|
@@ -436,3 +437,316 @@ export const contractLedgerOperations = [
|
|
|
436
437
|
},
|
|
437
438
|
},
|
|
438
439
|
];
|
|
440
|
+
// ------------------------------------------------- 台账入口路由(2026-11-19)
|
|
441
|
+
/**
|
|
442
|
+
* 统计信号:只有「要一个算出来的结果」才算统计诉求。
|
|
443
|
+
*
|
|
444
|
+
* 判错根因是拿「业绩」这个词当聚合信号——它只是台账名与字段名;
|
|
445
|
+
* 年 / 季 / 月只是收窄范围的筛选条件;「某个人的 / 某个团队的」只是筛选维度。
|
|
446
|
+
* 真正的信号只有聚合动作、比较排名、判断核对、产物诉求四类。
|
|
447
|
+
*/
|
|
448
|
+
const STAT_SIGNALS = [
|
|
449
|
+
{ key: 'aggregate', label: '聚合动作', pattern: /多少|几份|几单|几个|合计|总共|累计|占比|平均|总额|加起来/u },
|
|
450
|
+
{ key: 'compare', label: '比较与排名', pattern: /排名|第几|同比|环比|对比|比较|趋势|top\s*\d+|前\s*\d+\s*名/u },
|
|
451
|
+
{ key: 'judge', label: '判断与核对', pattern: /达标|完成率|对不上|对得上|差多少|差额|有没有验收|有没有收款|是否验收/u },
|
|
452
|
+
{ key: 'report', label: '产物诉求', pattern: /报表|仪表盘|图表|看板|导出/u },
|
|
453
|
+
];
|
|
454
|
+
const ROUTE_CONDITION_NAMES = [
|
|
455
|
+
'person',
|
|
456
|
+
'team',
|
|
457
|
+
'yearMonth',
|
|
458
|
+
'dateRange',
|
|
459
|
+
'customer',
|
|
460
|
+
'contractNo',
|
|
461
|
+
];
|
|
462
|
+
/** 每个台账标签支持的条件 → 台账筛选键;缺项即「该条件落不到这张卡上」。 */
|
|
463
|
+
const CONDITION_TO_FILTER = {
|
|
464
|
+
directPerf: { person: 'xsjl', team: 'tdfzr', yearMonth: 'yjny', customer: 'khmc', contractNo: 'hth' },
|
|
465
|
+
ecology: { person: 'xsjl2', dateRange: 'qdrq', customer: 'khmc', contractNo: 'hth' },
|
|
466
|
+
etOrder: { dateRange: 'qdrq', customer: 'khmc' },
|
|
467
|
+
agree: { dateRange: 'qdrq', customer: 'dls', contractNo: 'xyh' },
|
|
468
|
+
};
|
|
469
|
+
/** 这两本台账只有 ebdf 列表卡,语义键一律预置不上,条件只能交给页面筛选。 */
|
|
470
|
+
const EBDF_ONLY_MENUS = ['合同收款', '项目验收'];
|
|
471
|
+
/**
|
|
472
|
+
* 原话没点名台账、也没带条件时的兜底意图提示(2026-11-19)。
|
|
473
|
+
*
|
|
474
|
+
* 文档口径(contract-performance-query.md §0):「看看我的合同」属「链路 1(组件卡)」,
|
|
475
|
+
* 应出台账卡;此前一律回落到 `直销业绩`,等于把「我的合同」当成「我的业绩」。
|
|
476
|
+
* 只在**菜单名与别名都没命中**时生效,命中的是完整短语(不用「合同」这类会误伤的裸词)。
|
|
477
|
+
*/
|
|
478
|
+
const MENU_INTENT_HINTS = [
|
|
479
|
+
{ pattern: /我的合同|看合同|查合同|合同台账|合同清单/u, menu: '直销合同' },
|
|
480
|
+
{ pattern: /我的业绩|看业绩|查业绩|业绩台账/u, menu: '直销业绩' },
|
|
481
|
+
];
|
|
482
|
+
/**
|
|
483
|
+
* 从用户原话里认台账名(2026-11-19 新增)。
|
|
484
|
+
*
|
|
485
|
+
* 事故背景:`menu` 为空时只看 conditions、从不看原话,导致「打开直销合同」这类
|
|
486
|
+
* 不带条件的诉求一律回落到 `直销业绩`——用户点名了台账却拿到另一本。
|
|
487
|
+
*
|
|
488
|
+
* 匹配顺序(都按 key 长度倒序,保证「渠道订单-商务」先于「渠道订单」):
|
|
489
|
+
* 1. 六个正式菜单名;
|
|
490
|
+
* 2. 别名,但只认「能定死一本台账」的:`ALIASES` 里排除掉会跨台账命中的宽词
|
|
491
|
+
* (`收款` / `验收` / `业绩` / `合同数据` 等)。命中宽词时**不猜**;
|
|
492
|
+
* 3. 兜底意图提示 `MENU_INTENT_HINTS`(如「我的合同」)。
|
|
493
|
+
* 命中多个不同菜单时同样不猜。
|
|
494
|
+
*/
|
|
495
|
+
const UNAMBIGUOUS_ALIAS_EXCLUDE = new Set([
|
|
496
|
+
'业绩', '个人业绩', '机构业绩', '大区业绩', '团队业绩',
|
|
497
|
+
'收款', '验收', '合同数据', 'e-cology合同', 'e-cology 合同',
|
|
498
|
+
]);
|
|
499
|
+
function inferMenuFromQuery(query) {
|
|
500
|
+
const text = query.trim();
|
|
501
|
+
if (!text)
|
|
502
|
+
return null;
|
|
503
|
+
const byLengthDesc = (list) => [...list].sort((a, b) => b.length - a.length);
|
|
504
|
+
const menuHit = byLengthDesc([...MENU_PAGES.keys()]).find((name) => text.includes(name));
|
|
505
|
+
if (menuHit)
|
|
506
|
+
return { menu: menuHit, hit: menuHit, via: 'menu' };
|
|
507
|
+
const aliasNames = byLengthDesc([...ALIASES.keys()].filter((name) => !UNAMBIGUOUS_ALIAS_EXCLUDE.has(name)));
|
|
508
|
+
const aliasHits = aliasNames.filter((name) => text.includes(name));
|
|
509
|
+
const targets = new Set(aliasHits.map((name) => ALIASES.get(name)));
|
|
510
|
+
if (targets.size === 1 && aliasHits.length) {
|
|
511
|
+
const hit = aliasHits[0];
|
|
512
|
+
return { menu: ALIASES.get(hit), hit, via: 'alias' };
|
|
513
|
+
}
|
|
514
|
+
const hint = MENU_INTENT_HINTS.find((item) => item.pattern.test(text));
|
|
515
|
+
if (hint)
|
|
516
|
+
return { menu: hint.menu, hit: hint.pattern.source, via: 'hint' };
|
|
517
|
+
return null;
|
|
518
|
+
}
|
|
519
|
+
/** `2026-11` → `["2026-11-01","2026-11-30"]`;非年月格式返回 null。 */ function yearMonthToRange(text) {
|
|
520
|
+
const matched = /^(\d{4})-(\d{1,2})$/u.exec(text.trim());
|
|
521
|
+
if (!matched)
|
|
522
|
+
return null;
|
|
523
|
+
const year = Number(matched[1]);
|
|
524
|
+
const month = Number(matched[2]);
|
|
525
|
+
if (month < 1 || month > 12)
|
|
526
|
+
return null;
|
|
527
|
+
const lastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
528
|
+
const mm = String(month).padStart(2, '0');
|
|
529
|
+
return [`${year}-${mm}-01`, `${year}-${mm}-${String(lastDay).padStart(2, '0')}`];
|
|
530
|
+
}
|
|
531
|
+
/** 人员值必须能归一化成 `[{ id, name }]`,否则算「落不到卡上」。 */
|
|
532
|
+
function normalizeRoutePerson(raw) {
|
|
533
|
+
if (raw === null || raw === undefined || raw === '')
|
|
534
|
+
return null;
|
|
535
|
+
const list = Array.isArray(raw) ? raw : [raw];
|
|
536
|
+
const out = [];
|
|
537
|
+
for (const item of list) {
|
|
538
|
+
if (!isRecord(item))
|
|
539
|
+
return null;
|
|
540
|
+
const id = String(item.id ?? '').trim();
|
|
541
|
+
const name = String(item.name ?? '').trim();
|
|
542
|
+
if (!/^\d{6,32}$/u.test(id) || !name)
|
|
543
|
+
return null;
|
|
544
|
+
out.push({ id, name });
|
|
545
|
+
}
|
|
546
|
+
return out.length ? out : null;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* 台账入口路由判定(本地,零接口)。
|
|
550
|
+
*
|
|
551
|
+
* 主判据是「条件能不能全部落到台账筛选键上」,不是「有没有统计词」:
|
|
552
|
+
* - 命中统计信号 / 显式要聚合对比核对产物 → `ledger-query`;
|
|
553
|
+
* - 其余一律 `card`,能预置的条件预置好,落不了的留给页面筛选。
|
|
554
|
+
*
|
|
555
|
+
* 本 operation 与 `contract.ledger.card` 共用 LEDGER_FILTER_KINDS 白名单,
|
|
556
|
+
* 判定与出卡不会各说一套。
|
|
557
|
+
*/
|
|
558
|
+
export const contractLedgerRouteOperation = {
|
|
559
|
+
name: 'contract.ledger.route',
|
|
560
|
+
risk: 'read',
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: 'object',
|
|
563
|
+
additionalProperties: false,
|
|
564
|
+
properties: {
|
|
565
|
+
query: { type: 'string', description: '用户原话,用于识别统计信号' },
|
|
566
|
+
menu: { type: 'string', description: '台账名称;缺省时按条件推断' },
|
|
567
|
+
intent: {
|
|
568
|
+
type: 'string',
|
|
569
|
+
description: '显式诉求:detail(只看明细)/ aggregate / compare / crosscheck / report',
|
|
570
|
+
},
|
|
571
|
+
conditions: {
|
|
572
|
+
type: 'object',
|
|
573
|
+
description: '条件对象:person / team / yearMonth / dateRange / customer / contractNo',
|
|
574
|
+
},
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
async execute(input) {
|
|
578
|
+
const query = typeof input.query === 'string' ? input.query : '';
|
|
579
|
+
const intent = typeof input.intent === 'string' ? input.intent.trim().toLowerCase() : '';
|
|
580
|
+
const conditions = isRecord(input.conditions) ? input.conditions : {};
|
|
581
|
+
const menuInput = typeof input.menu === 'string' ? input.menu.trim() : '';
|
|
582
|
+
const matchedSignals = STAT_SIGNALS
|
|
583
|
+
.filter((signal) => signal.pattern.test(query))
|
|
584
|
+
.map((signal) => ({ key: signal.key, label: signal.label }));
|
|
585
|
+
let menu = menuInput;
|
|
586
|
+
let menuNote = '';
|
|
587
|
+
if (!menu) {
|
|
588
|
+
// 先看用户说没说出台账名:长名优先(渠道订单-商务 先于 渠道订单),
|
|
589
|
+
// 只认「拿到菜单后能定死一本台账」的别名,避免「业绩」这类宽词误命中。
|
|
590
|
+
const fromQuery = inferMenuFromQuery(query);
|
|
591
|
+
if (fromQuery) {
|
|
592
|
+
menu = fromQuery.menu;
|
|
593
|
+
if (fromQuery.via === 'alias') {
|
|
594
|
+
menuNote = `按用户原话里的「${fromQuery.hit}」判定为「${fromQuery.menu}」`;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
else if (conditions.person || conditions.team || conditions.yearMonth) {
|
|
598
|
+
menu = '直销业绩';
|
|
599
|
+
}
|
|
600
|
+
else if (conditions.dateRange || conditions.customer || conditions.contractNo) {
|
|
601
|
+
menu = '直销合同';
|
|
602
|
+
}
|
|
603
|
+
else {
|
|
604
|
+
menu = '直销业绩';
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
const isEbdf = EBDF_ONLY_MENUS.includes(menu);
|
|
608
|
+
const viewKey = LEDGER_VIEW_KEYS.get(menu) ?? null;
|
|
609
|
+
if (!isEbdf && !viewKey) {
|
|
610
|
+
throw contractValidationError('menu_unknown', `未知台账 ${menu},可选:直销合同、直销业绩、渠道订单、渠道订单-商务、合同收款、项目验收`);
|
|
611
|
+
}
|
|
612
|
+
const mapping = viewKey ? CONDITION_TO_FILTER[viewKey] ?? {} : {};
|
|
613
|
+
const prefill = {};
|
|
614
|
+
const unsupported = [];
|
|
615
|
+
const approximations = [];
|
|
616
|
+
if (menuNote)
|
|
617
|
+
approximations.push(menuNote);
|
|
618
|
+
const hasValue = (name) => {
|
|
619
|
+
const value = conditions[name];
|
|
620
|
+
return value !== undefined && value !== null && value !== '';
|
|
621
|
+
};
|
|
622
|
+
if (isEbdf) {
|
|
623
|
+
for (const name of ROUTE_CONDITION_NAMES) {
|
|
624
|
+
if (hasValue(name))
|
|
625
|
+
unsupported.push(name);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
if (hasValue('person')) {
|
|
630
|
+
const person = normalizeRoutePerson(conditions.person);
|
|
631
|
+
const key = mapping.person;
|
|
632
|
+
if (person && key)
|
|
633
|
+
prefill[key] = person;
|
|
634
|
+
else
|
|
635
|
+
unsupported.push('person');
|
|
636
|
+
}
|
|
637
|
+
if (hasValue('team')) {
|
|
638
|
+
const team = normalizeRoutePerson(conditions.team);
|
|
639
|
+
const key = mapping.team;
|
|
640
|
+
if (team && key) {
|
|
641
|
+
prefill[key] = team;
|
|
642
|
+
approximations.push('团队按「团队负责人」字段近似预置,团队口径请在页面确认');
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
unsupported.push('team');
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
if (hasValue('yearMonth')) {
|
|
649
|
+
const text = String(conditions.yearMonth).trim();
|
|
650
|
+
const monthKey = mapping.yearMonth;
|
|
651
|
+
const rangeKey = mapping.dateRange;
|
|
652
|
+
if (monthKey && /^\d{4}-\d{1,2}$/u.test(text)) {
|
|
653
|
+
prefill[monthKey] = text;
|
|
654
|
+
}
|
|
655
|
+
else if (rangeKey) {
|
|
656
|
+
const range = yearMonthToRange(text);
|
|
657
|
+
if (range)
|
|
658
|
+
prefill[rangeKey] = range;
|
|
659
|
+
else
|
|
660
|
+
unsupported.push('yearMonth');
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
unsupported.push('yearMonth');
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
if (hasValue('dateRange')) {
|
|
667
|
+
const raw = conditions.dateRange;
|
|
668
|
+
const valid = Array.isArray(raw)
|
|
669
|
+
&& raw.length === 2
|
|
670
|
+
&& raw.every((item) => typeof item === 'string' && /^\d{4}-\d{2}-\d{2}$/u.test(item));
|
|
671
|
+
const key = mapping.dateRange;
|
|
672
|
+
if (valid && key)
|
|
673
|
+
prefill[key] = raw;
|
|
674
|
+
else
|
|
675
|
+
unsupported.push('dateRange');
|
|
676
|
+
}
|
|
677
|
+
if (hasValue('customer')) {
|
|
678
|
+
const text = String(conditions.customer).trim();
|
|
679
|
+
const key = mapping.customer;
|
|
680
|
+
if (key && text) {
|
|
681
|
+
prefill[key] = text;
|
|
682
|
+
if (viewKey === 'agree')
|
|
683
|
+
approximations.push('渠道订单-商务的客户条件落到「代理商名称」');
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
unsupported.push('customer');
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
if (hasValue('contractNo')) {
|
|
690
|
+
const text = String(conditions.contractNo).trim();
|
|
691
|
+
const key = mapping.contractNo;
|
|
692
|
+
if (key && text)
|
|
693
|
+
prefill[key] = text;
|
|
694
|
+
else
|
|
695
|
+
unsupported.push('contractNo');
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const canPrefillAll = unsupported.length === 0;
|
|
699
|
+
const strongIntent = ['aggregate', 'compare', 'crosscheck', 'report'].includes(intent);
|
|
700
|
+
const reasons = [];
|
|
701
|
+
let route;
|
|
702
|
+
if (strongIntent) {
|
|
703
|
+
route = 'ledger-query';
|
|
704
|
+
reasons.push(`显式诉求 intent=${intent}:要的是页面给不出的结论`);
|
|
705
|
+
}
|
|
706
|
+
else if (matchedSignals.length) {
|
|
707
|
+
route = 'ledger-query';
|
|
708
|
+
reasons.push(`命中统计信号:${matchedSignals.map((item) => item.label).join('、')}`);
|
|
709
|
+
}
|
|
710
|
+
else if (intent === 'detail') {
|
|
711
|
+
route = 'card';
|
|
712
|
+
reasons.push('显式 intent=detail:只看明细,直接出卡');
|
|
713
|
+
}
|
|
714
|
+
else if (isEbdf) {
|
|
715
|
+
route = 'card';
|
|
716
|
+
reasons.push('合同收款 / 项目验收只有 ebdf 列表卡,条件必须交给页面筛选');
|
|
717
|
+
}
|
|
718
|
+
else if (canPrefillAll) {
|
|
719
|
+
route = 'card';
|
|
720
|
+
reasons.push('条件全部可预置到台账筛选键,直接出卡并预置');
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
route = 'card';
|
|
724
|
+
reasons.push('未命中统计信号,按看台账处理;落不了的条件留给页面筛选');
|
|
725
|
+
}
|
|
726
|
+
const prefillKeys = Object.keys(prefill);
|
|
727
|
+
const nextCommand = route === 'card'
|
|
728
|
+
? 'weaver-work-cli --json contract run contract.ledger.card --input <args.json>'
|
|
729
|
+
+ `(menu=${menu}${prefillKeys.length ? `,comParamsJson=${JSON.stringify(prefill)}` : ''})`
|
|
730
|
+
: 'contract.ledger.metrics 取口径 → contract.performance.list.query 取数 → contract.ledger.aggregate 汇总';
|
|
731
|
+
return {
|
|
732
|
+
status: 'COMPLETE',
|
|
733
|
+
data: {
|
|
734
|
+
route,
|
|
735
|
+
menu,
|
|
736
|
+
variant: isEbdf ? 'ebdf-list' : 'ledger',
|
|
737
|
+
viewKey,
|
|
738
|
+
prefill,
|
|
739
|
+
canPrefillAll,
|
|
740
|
+
unsupportedConditions: unsupported,
|
|
741
|
+
approximations,
|
|
742
|
+
matchedSignals,
|
|
743
|
+
reasons,
|
|
744
|
+
nextCommand,
|
|
745
|
+
conditions,
|
|
746
|
+
note: 'route=card 时禁止先进取数链路;只有统计信号或显式 intent 才走 ledger-query。'
|
|
747
|
+
+ '「业绩」二字、年月、「某个人的 / 某个团队的」都不是统计信号。本 operation 不访问业务接口。',
|
|
748
|
+
},
|
|
749
|
+
};
|
|
750
|
+
},
|
|
751
|
+
};
|
|
752
|
+
export const contractLedgerRouteOperations = [contractLedgerRouteOperation];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { contractValidationError } from '../errors.js';
|
|
2
|
+
import { LEDGER_METRICS, findLedgerMetric, unresolvedMetricFields, } from '../data/metric-catalog.js';
|
|
3
|
+
/**
|
|
4
|
+
* 统计口径查询(只读、纯本地,不访问任何业务接口)。
|
|
5
|
+
*
|
|
6
|
+
* 为什么单独出一个 operation:口径(业绩认哪个字段、已收款取自哪本台账、
|
|
7
|
+
* eteams 业绩怎么圈)必须由实现提供给调用方,不能靠模型从文档里记。
|
|
8
|
+
* 模型按返回的 `queryPlan` 组装 `contract.performance.list.query`,
|
|
9
|
+
* 按 `metricDataKey` 汇总返回行,就不会再把「有效金额」当成「冲刺有效金额」。
|
|
10
|
+
*/
|
|
11
|
+
/** 把口径翻译成可直接执行的查询计划(字段 ID 未知时保留字段名待解析)。 */
|
|
12
|
+
function buildQueryPlan(metric) {
|
|
13
|
+
const conditions = metric.conditions.map((cond) => ({
|
|
14
|
+
field: cond.field,
|
|
15
|
+
fieldId: cond.fieldId,
|
|
16
|
+
fieldKey: cond.fieldId ? `field_${cond.fieldId}` : null,
|
|
17
|
+
dataKey: cond.dataKey,
|
|
18
|
+
operator: cond.operator,
|
|
19
|
+
value: cond.value ?? null,
|
|
20
|
+
required: cond.required,
|
|
21
|
+
note: cond.note ?? null,
|
|
22
|
+
}));
|
|
23
|
+
const unresolved = unresolvedMetricFields(metric);
|
|
24
|
+
const aggregateHint = metric.metricDataKey
|
|
25
|
+
? `取回结果后按返回行的「${metric.metricDataKey}」键求和(字段「${metric.metricField}」);该键来自 getListDatas 响应 data.columns 的 dataKey,不是字段中文名。`
|
|
26
|
+
: `取回结果后按「${metric.metricField}」对应返回键求和;键名未登记,先核对非空键再汇总。`;
|
|
27
|
+
return {
|
|
28
|
+
operation: 'contract.performance.list.query',
|
|
29
|
+
apiPrefix: '/api/ebuilder',
|
|
30
|
+
appId: '0',
|
|
31
|
+
listId: metric.listId,
|
|
32
|
+
objId: metric.objId,
|
|
33
|
+
pageId: metric.pageId,
|
|
34
|
+
viewKey: metric.viewKey,
|
|
35
|
+
conditions,
|
|
36
|
+
metricField: metric.metricField,
|
|
37
|
+
metricFieldId: metric.metricFieldId,
|
|
38
|
+
metricFieldKey: metric.metricFieldId ? `field_${metric.metricFieldId}` : null,
|
|
39
|
+
metricDataKey: metric.metricDataKey,
|
|
40
|
+
aggregation: metric.aggregation,
|
|
41
|
+
aggregateOperation: 'contract.ledger.aggregate',
|
|
42
|
+
aggregateHint,
|
|
43
|
+
unresolvedFields: unresolved,
|
|
44
|
+
resolveHint: unresolved.length
|
|
45
|
+
? `字段 ID 未登记实测值:用 contract.performance.list.query(includeColumns=true)读响应 data.columns,按字段名 ${unresolved.join('、')} 解析 fieldId 与 dataKey,禁止猜 ID。`
|
|
46
|
+
: '口径涉及字段 ID 与返回键均已实测验证,可直接使用。',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export const contractLedgerMetricsOperations = [
|
|
50
|
+
{
|
|
51
|
+
name: 'contract.ledger.metrics',
|
|
52
|
+
async execute(input) {
|
|
53
|
+
const rawKey = typeof input.key === 'string' ? input.key.trim() : '';
|
|
54
|
+
let metrics;
|
|
55
|
+
if (rawKey) {
|
|
56
|
+
const found = findLedgerMetric(rawKey);
|
|
57
|
+
if (!found) {
|
|
58
|
+
throw contractValidationError('metric_unknown', `未知统计口径 ${rawKey};可用:${LEDGER_METRICS.map((item) => `${item.key}(${item.label})`).join('、')}`);
|
|
59
|
+
}
|
|
60
|
+
metrics = [found];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
metrics = LEDGER_METRICS;
|
|
64
|
+
}
|
|
65
|
+
const warnings = [];
|
|
66
|
+
for (const metric of metrics) {
|
|
67
|
+
const unresolved = unresolvedMetricFields(metric);
|
|
68
|
+
if (unresolved.length) {
|
|
69
|
+
warnings.push(`${metric.label}:${unresolved.join('、')} 的字段 ID 未登记实测值,取数前需按字段名运行时解析。`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
status: 'COMPLETE',
|
|
74
|
+
data: {
|
|
75
|
+
metrics: metrics.map((metric) => ({
|
|
76
|
+
key: metric.key,
|
|
77
|
+
label: metric.label,
|
|
78
|
+
ledger: metric.ledger,
|
|
79
|
+
metricField: metric.metricField,
|
|
80
|
+
metricFieldId: metric.metricFieldId,
|
|
81
|
+
metricDataKey: metric.metricDataKey,
|
|
82
|
+
aggregation: metric.aggregation,
|
|
83
|
+
conditions: metric.conditions,
|
|
84
|
+
note: metric.note,
|
|
85
|
+
queryPlan: buildQueryPlan(metric),
|
|
86
|
+
})),
|
|
87
|
+
count: metrics.length,
|
|
88
|
+
warnings,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
];
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 范文库(「合同范文管理」EB 表单)查询。
|
|
3
3
|
*
|
|
4
4
|
* 术语约定:今承达技能内「模板」等同于「范文」(模板 == 范文),
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* 因此本文件服务的是**范文库**;合同模板库(`/api/ebd/contract/tplinfo/**`)在本 CLI 侧已于 2026-11-19 随
|
|
6
|
+
* `contract.template.*` 一并移除,两者取数链路与字段本就不同,禁止互相代替。
|
|
7
7
|
*/
|
|
8
8
|
const MODEL_TEXT_OBJ_ID = '1290191829260230657';
|
|
9
9
|
const MODEL_TEXT_LIST_ID = '1290191833571975256';
|
|
@@ -122,7 +122,7 @@ export const contractModelTextListOperation = {
|
|
|
122
122
|
creator: personName(row.creator),
|
|
123
123
|
updater: personName(row.updater),
|
|
124
124
|
})),
|
|
125
|
-
hint: '本命令读的是范文库(「合同范文管理」);本技能内「模板」==
|
|
125
|
+
hint: '本命令读的是范文库(「合同范文管理」);本技能内「模板」== 「范文」。合同模板库(tplinfo)的 contract.template.* 已从本 CLI 移除,配置模板库不在本 CLI 范围(也没有对应技能包)',
|
|
126
126
|
},
|
|
127
127
|
};
|
|
128
128
|
},
|
|
@@ -47,14 +47,18 @@ export function creditPageUrl(baseUrl, names) {
|
|
|
47
47
|
const segments = names.map((name, index) => `name[${index}]=${encodeURIComponent(name)}`);
|
|
48
48
|
return `${baseOf(baseUrl)}/sp/contract/business/credit?${segments.join('&')}`;
|
|
49
49
|
}
|
|
50
|
-
/** 流程发起页;带 fileId
|
|
50
|
+
/** 流程发起页;带 fileId 时只追加 fileId(2026-11-19 起不再追加 automaticFormFilling)。 */
|
|
51
51
|
export function flowPageUrl(baseUrl, workflowId, fileId) {
|
|
52
52
|
const base = `${baseOf(baseUrl)}/sp/workflow/flowpage/create/${workflowId}?workflowId=${workflowId}&isCreate=1`;
|
|
53
|
-
return fileId ? `${base}&fileId=${fileId}
|
|
53
|
+
return fileId ? `${base}&fileId=${fileId}` : base;
|
|
54
54
|
}
|
|
55
|
-
/**
|
|
55
|
+
/** 范文推荐结果页路由(组件内嵌用,不含域名;禁止整体编码)。 */
|
|
56
|
+
export function recommendPagePath(cacheKey) {
|
|
57
|
+
return `/sp/contract/business/template-list?recommendKey=${cacheKey}`;
|
|
58
|
+
}
|
|
59
|
+
/** 范文推荐结果页完整地址(仅作兜底与日志;打开页面必须走组件卡,禁止 open_web)。 */
|
|
56
60
|
export function recommendPageUrl(baseUrl, cacheKey) {
|
|
57
|
-
return `${baseOf(baseUrl)}
|
|
61
|
+
return `${baseOf(baseUrl)}${recommendPagePath(cacheKey)}`;
|
|
58
62
|
}
|
|
59
63
|
/** 条款库页(源资料要求每次条款库操作后都打开,tab=1 固定)。 */
|
|
60
64
|
export function clauseLibraryPageUrl(baseUrl) {
|
|
@@ -382,6 +382,38 @@ function requireOrigin(input) {
|
|
|
382
382
|
function pageContract(name, summary, props, required) {
|
|
383
383
|
return { name, summary, risk: 'read', inputSchema: { type: 'object', additionalProperties: false, properties: props, required } };
|
|
384
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* 提取 getListDatas 响应里的列结构(字段名 → 字段 ID → 返回键)。
|
|
387
|
+
*
|
|
388
|
+
* 实测(2026-11-18):响应 `data.columns` 是列定义数组,每项含
|
|
389
|
+
* `title`(字段中文名)、`fieldId`、`dataKey`(返回行里的键)、`componentKey`(组件类型)。
|
|
390
|
+
* 统计口径需要「字段名 → 字段 ID」时用它解析,不需要再单独调 getListFields。
|
|
391
|
+
* 分组表头(`children` 非空)递归展开,只保留叶子列。
|
|
392
|
+
*/
|
|
393
|
+
function summarizeColumns(node) {
|
|
394
|
+
const raw = node.columns;
|
|
395
|
+
if (!Array.isArray(raw))
|
|
396
|
+
return [];
|
|
397
|
+
const out = [];
|
|
398
|
+
for (const item of raw) {
|
|
399
|
+
if (!item || typeof item !== 'object')
|
|
400
|
+
continue;
|
|
401
|
+
const col = item;
|
|
402
|
+
const children = Array.isArray(col.children) ? col.children : [];
|
|
403
|
+
if (children.length > 0) {
|
|
404
|
+
out.push(...summarizeColumns({ columns: children }));
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
const name = String(col.title ?? col.customTitle ?? '').trim();
|
|
408
|
+
out.push({
|
|
409
|
+
name,
|
|
410
|
+
fieldId: col.fieldId ? String(col.fieldId) : null,
|
|
411
|
+
dataKey: col.dataKey ? String(col.dataKey) : null,
|
|
412
|
+
componentKey: col.componentKey ? String(col.componentKey) : null,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return out;
|
|
416
|
+
}
|
|
385
417
|
export const contractPerformanceOperations = [
|
|
386
418
|
{
|
|
387
419
|
name: 'contract.performance.link',
|
|
@@ -585,6 +617,12 @@ export const contractPerformanceOperations = [
|
|
|
585
617
|
required: ['apiPrefix', 'listId', 'appId', 'objId'],
|
|
586
618
|
},
|
|
587
619
|
async execute(input, context) {
|
|
620
|
+
const ledgerIntent = typeof input.ledgerIntent === 'string' ? input.ledgerIntent.trim().toLowerCase() : '';
|
|
621
|
+
if (ledgerIntent === 'detail') {
|
|
622
|
+
throw contractValidationError('ledger_should_open_card', '只是要看明细、没有要算出来的结论,不走取数链路。'
|
|
623
|
+
+ '请改用 contract.ledger.card 出台账卡并预置条件(人 / 团队 / 年月 / 客户 / 合同号都能落到筛选键)。'
|
|
624
|
+
+ '需要合计、对比、核对或报表时,再把 ledgerIntent 传 aggregate / compare / crosscheck / report 重新调用。');
|
|
625
|
+
}
|
|
588
626
|
const prefix = requireApiPrefix(input.apiPrefix);
|
|
589
627
|
const listId = requireNonEmptyString(input.listId, 'listId');
|
|
590
628
|
const appId = requireNonEmptyString(input.appId, 'appId');
|
|
@@ -626,6 +664,15 @@ export const contractPerformanceOperations = [
|
|
|
626
664
|
},
|
|
627
665
|
pageSize: { type: 'number' },
|
|
628
666
|
maxPages: { type: 'number', description: '最多翻页数,默认 10;到达上限且仍有数据会提示缩小范围' },
|
|
667
|
+
includeColumns: {
|
|
668
|
+
type: 'boolean',
|
|
669
|
+
description: '是否同时回传 getListDatas 响应的列结构探测信息(响应顶层键、各键类型与首元素键名)',
|
|
670
|
+
},
|
|
671
|
+
ledgerIntent: {
|
|
672
|
+
type: 'string',
|
|
673
|
+
description: '取数意图:aggregate / compare / crosscheck / report 表示要页面给不出的结论;'
|
|
674
|
+
+ 'detail 表示只是要看明细,会被拦下并引导改用台账卡',
|
|
675
|
+
},
|
|
629
676
|
},
|
|
630
677
|
required: ['apiPrefix', 'listId', 'appId', 'objId'],
|
|
631
678
|
},
|
|
@@ -678,6 +725,8 @@ export const contractPerformanceOperations = [
|
|
|
678
725
|
const rows = [];
|
|
679
726
|
let total = null;
|
|
680
727
|
let page = 1;
|
|
728
|
+
const includeColumns = input.includeColumns === true;
|
|
729
|
+
let columnInfo = null;
|
|
681
730
|
for (; page <= maxPages; page++) {
|
|
682
731
|
body.current = page;
|
|
683
732
|
const data = (await context.host.contractRequest({
|
|
@@ -686,6 +735,9 @@ export const contractPerformanceOperations = [
|
|
|
686
735
|
body,
|
|
687
736
|
}));
|
|
688
737
|
const display = data?.data?.displayData;
|
|
738
|
+
if (includeColumns && columnInfo === null) {
|
|
739
|
+
columnInfo = summarizeColumns((data?.data ?? {}));
|
|
740
|
+
}
|
|
689
741
|
const batch = Array.isArray(display) ? display : Array.isArray(data?.data?.rows) ? data.data.rows : [];
|
|
690
742
|
rows.push(...batch);
|
|
691
743
|
const count = (await context.host.contractRequest({
|
|
@@ -705,6 +757,7 @@ export const contractPerformanceOperations = [
|
|
|
705
757
|
searchParamData,
|
|
706
758
|
rows,
|
|
707
759
|
pagination: { total, fetched: rows.length, pageSize, truncated, maxPages },
|
|
760
|
+
...(includeColumns ? { columns: columnInfo } : {}),
|
|
708
761
|
warning: truncated
|
|
709
762
|
? `真实总数 ${total} 超过本次取回 ${rows.length} 条(maxPages=${maxPages})。请缩小范围后重查,不能把部分结果当全量。`
|
|
710
763
|
: null,
|