weaver-work-cli 0.1.73 → 0.1.76
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 +37 -1
- package/dist/chunks/{archive-THZV4ND4.js → archive-ENBSUMHV.js} +14 -9
- package/dist/chunks/{archive-oa-PQ23OLEV.js → archive-oa-7BFPQ6M5.js} +10 -7
- package/dist/chunks/{asset-RGPROZYH.js → asset-V5SUD3PW.js} +10 -7
- package/dist/chunks/{asset-idle-Z2PDX7NA.js → asset-idle-3CEL7WFX.js} +7 -4
- package/dist/chunks/{attachment-content-R3RPVOYE.js → attachment-content-24RL44SE.js} +3 -3
- package/dist/chunks/{blog-7U3QZPIF.js → blog-FLI4SS3P.js} +10 -7
- package/dist/chunks/{caizhilian-3AB42GCV.js → caizhilian-7WCTKCCP.js} +10 -7
- package/dist/chunks/{calendar-KINM64E4.js → calendar-G726HUUH.js} +10 -7
- package/dist/chunks/chunk-257JXJGD.js +30 -0
- package/dist/chunks/chunk-2BZ7TY4M.js +49 -0
- package/dist/chunks/{chunk-4BXR6CNB.js → chunk-2KW7AI6P.js} +2 -2
- package/dist/chunks/{chunk-WM33BSIL.js → chunk-2QCCXPNU.js} +1 -1
- package/dist/chunks/chunk-2UV4IZIT.js +473 -0
- package/dist/chunks/{chunk-R3MK2RBN.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-DRUND2PJ.js → chunk-5QUTQHXF.js} +225 -152
- package/dist/chunks/chunk-7DE3VMZD.js +35 -0
- package/dist/chunks/{chunk-PAFOLIYQ.js → chunk-AZC53XSQ.js} +1 -1
- package/dist/chunks/{chunk-6HT73VOI.js → chunk-BWFCTE43.js} +2 -2
- package/dist/chunks/{chunk-4YXAK6OA.js → chunk-FEZK536Z.js} +12 -7
- package/dist/chunks/{chunk-IU6UB2TD.js → chunk-FPWCCRKT.js} +48 -6
- package/dist/chunks/{chunk-LLCMOZ5L.js → chunk-H6N6U2D6.js} +11 -11
- package/dist/chunks/{chunk-54ST55IJ.js → chunk-JJONWB5N.js} +11 -1
- package/dist/chunks/{chunk-GWJLAF6B.js → chunk-JWF2R6EQ.js} +0 -462
- package/dist/chunks/chunk-KINXYJXM.js +205 -0
- package/dist/chunks/{chunk-F4HM25K4.js → chunk-KJA7CRES.js} +1 -1
- package/dist/chunks/chunk-L5SCNJKX.js +1166 -0
- package/dist/chunks/{chunk-TV46Q4NY.js → chunk-MS7MKBGJ.js} +74 -68
- package/dist/chunks/{chunk-XZBYRYWX.js → chunk-NZQRW4KL.js} +2 -2
- package/dist/chunks/chunk-OJ4JPD25.js +428 -0
- package/dist/chunks/chunk-OVTCWLNQ.js +1346 -0
- package/dist/chunks/{chunk-NUP4RYZK.js → chunk-PMRNIGKZ.js} +2 -2
- package/dist/chunks/{chunk-2CHGUYMG.js → chunk-Q7RXCK2Y.js} +4 -4
- package/dist/chunks/{chunk-AMAPQVBT.js → chunk-QVKRNL7L.js} +286 -305
- package/dist/chunks/{chunk-7QFVXP2X.js → chunk-R4PN3OFK.js} +8 -7
- package/dist/chunks/{chunk-L7TYG5SN.js → chunk-RVEKGVZU.js} +2 -2
- package/dist/chunks/{chunk-2XED2FKY.js → chunk-SQFKBWTR.js} +38 -36
- package/dist/chunks/chunk-SU6IJD6D.js +49 -0
- package/dist/chunks/{chunk-IBSJJGXL.js → chunk-T7HVQ2WP.js} +2 -2
- package/dist/chunks/{chunk-ZWLWXHJC.js → chunk-TBCKK6LH.js} +2 -2
- package/dist/chunks/{chunk-JMJBPP4B.js → chunk-UDBQJLQF.js} +2 -2
- package/dist/chunks/chunk-UUJK76HV.js +209 -0
- package/dist/chunks/{chunk-4I26YMBY.js → chunk-WHI6YAUE.js} +7 -3
- package/dist/chunks/{chunk-BWYVS62Z.js → chunk-WJQJ7YEX.js} +4 -4
- package/dist/chunks/{chunk-GAMGDNTF.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/chunk-Y3C6MDL7.js +28 -0
- package/dist/chunks/chunk-ZM7RN2IM.js +38 -0
- package/dist/chunks/cli-DFLV57LO.js +226 -0
- package/dist/chunks/commands-J52MJ6NF.js +70 -0
- package/dist/chunks/{conflict-VPAR7E6F.js → conflict-72Q6DM4I.js} +2 -2
- package/dist/chunks/{contract-DDXAO2DZ.js → contract-IRNRQ5FY.js} +12446 -5964
- package/dist/chunks/{cowork-34QCHMDD.js → cowork-GZDODGKF.js} +11 -8
- package/dist/chunks/{create-flow-52PU2OBI.js → create-flow-UGTDI7SP.js} +6 -6
- package/dist/chunks/{data-CLQ62QGD.js → data-HTQZRPPI.js} +6 -3
- package/dist/chunks/{ebuilder-form-W5R7Q22S.js → ebuilder-form-GHNIZ7ET.js} +9 -6
- package/dist/chunks/{ehr-LCNAVMK5.js → ehr-PHIBBUIG.js} +23 -16
- package/dist/chunks/{entry-mode-6Z3ZV3DE.js → entry-mode-5WOXFE67.js} +3 -3
- package/dist/chunks/{env-RDKWAARB.js → env-H4ALHESA.js} +2 -2
- package/dist/chunks/{esb-ANKPUU65.js → esb-ATRKVHCD.js} +10 -7
- package/dist/chunks/{factory-434B7RAT.js → factory-COX6AVK7.js} +1 -1
- package/dist/chunks/{fna-AKBSG5HI.js → fna-IKYI3SST.js} +13 -8
- package/dist/chunks/{group-chat-PROTW22R.js → group-chat-ZIWQQO4G.js} +3 -3
- package/dist/chunks/{host-5R2SNFWD.js → host-6UOXYOOY.js} +6 -3
- package/dist/chunks/{host-7FJW4E7R.js → host-EJSJSLVK.js} +6 -3
- package/dist/chunks/{host-WO4L5G5I.js → host-EYNLB6S4.js} +6 -3
- package/dist/chunks/{host-PDJAKCT7.js → host-OT4KNR3G.js} +6 -3
- package/dist/chunks/{host-CGXUFQO4.js → host-UY4LQPN4.js} +6 -3
- package/dist/chunks/{host-XIYG4F4B.js → host-XXGDQM7D.js} +6 -3
- package/dist/chunks/{hrm-WGODDTEH.js → hrm-5JQ7QZ6A.js} +8 -5
- package/dist/chunks/{im-YKTKAJU3.js → im-2YJW3EI5.js} +7 -4
- package/dist/chunks/{invoice-PVYCCCVM.js → invoice-37HR6L3W.js} +956 -566
- package/dist/chunks/{jiuchuanhui-RKOQW7BY.js → jiuchuanhui-KBWUZ7WT.js} +17 -10
- package/dist/chunks/{lazy-dispatch-DW45AFQ5.js → lazy-dispatch-MZ3EZYDL.js} +22 -8
- package/dist/chunks/{mail-BNB5S4NW.js → mail-YBKUM6HM.js} +11 -8
- package/dist/chunks/{meeting-O2KDJH66.js → meeting-XE6CTXYA.js} +22 -18
- package/dist/chunks/{minute-doc-JUCG56GY.js → minute-doc-4BA2R5EA.js} +4 -4
- package/dist/chunks/{okr-LWFGWOE7.js → okr-HW7IULIR.js} +10 -7
- package/dist/chunks/{operations-532PN5OB.js → operations-4P2UYVLH.js} +7 -4
- package/dist/chunks/{performance-7W5COCFU.js → performance-PM2G6L3E.js} +6 -3
- package/dist/chunks/{plan-ZVY3IYTL.js → plan-3YYGZ7ZM.js} +10 -7
- package/dist/chunks/{project-SA62B7MH.js → project-XREEXFU2.js} +10 -7
- package/dist/chunks/{reception-NGIONPQ3.js → reception-7G3J2MA6.js} +8 -4
- package/dist/chunks/{recruit-stage-WOSN6MGP.js → recruit-stage-TSQWOGQD.js} +199 -74
- package/dist/chunks/register-SQOPIR2G.js +16 -0
- package/dist/chunks/{registry-N7P3W2RD.js → registry-3VTB3KLV.js} +7 -4
- package/dist/chunks/registry-7UDUWYB5.js +30 -0
- package/dist/chunks/{registry-R72GWXOG.js → registry-F4YFZLOD.js} +7 -3
- package/dist/chunks/{room-recommend-KCGIVUFR.js → room-recommend-FO3HLPNB.js} +4 -4
- package/dist/chunks/root-YZG2TS5W.js +16 -0
- package/dist/chunks/{schedule-6UP27HQ4.js → schedule-DHNNOHVS.js} +4 -4
- package/dist/chunks/{smart-extract-DDOQSPRB.js → smart-extract-T5Z4AULN.js} +15 -7
- package/dist/chunks/update-AV5VOXGY.js +13 -0
- package/dist/chunks/{workflow-V5ALD6QZ.js → workflow-MAGCHWYZ.js} +15 -10
- package/dist/cli.js +40 -0
- package/dist/cmd/action.js +3 -1
- package/dist/cmd/doctor/index.js +1 -1
- package/dist/cmd/e10/index.js +1 -1
- package/dist/cmd/identity/index.js +5 -8
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/setup/index.js +1 -1
- package/dist/cmd/update/index.js +38 -0
- package/dist/core/manifest-view.js +1 -1
- package/dist/core/output.js +8 -1
- package/dist/core/runtime-agent.js +13 -0
- package/dist/core/update-notice.js +23 -0
- package/dist/index.js +105 -198
- package/dist/internal/e10/auth/agent-host-key.js +16 -0
- package/dist/internal/e10/auth/agent-hosts.js +45 -9
- package/dist/internal/e10/auth/commands.js +66 -36
- package/dist/internal/e10/auth/session.js +30 -15
- package/dist/internal/e10/auth/xiaoe.js +4 -20
- package/dist/internal/e10/auth-recovery.js +44 -4
- package/dist/internal/e10/context.js +5 -2
- package/dist/internal/update/bootstrap.js +96 -0
- package/dist/internal/update/npm.js +78 -0
- package/dist/internal/update/service.js +252 -0
- package/dist/internal/update/store.js +135 -0
- package/dist/shortcuts/archive/index.js +2 -2
- package/dist/shortcuts/archive/manifest.js +1 -0
- package/dist/shortcuts/archive/operations/search.js +3 -1
- package/dist/shortcuts/archive-oa/index.js +1 -1
- package/dist/shortcuts/asset/index.js +1 -1
- package/dist/shortcuts/asset-idle/index.js +1 -1
- package/dist/shortcuts/blog/index.js +1 -1
- package/dist/shortcuts/caizhilian/index.js +1 -1
- package/dist/shortcuts/calendar/index.js +1 -1
- package/dist/shortcuts/contract/data/bi-config.js +156 -0
- package/dist/shortcuts/contract/data/collection-ledger-html.js +189 -0
- package/dist/shortcuts/contract/data/collection-node-catalog.js +226 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +154 -20
- package/dist/shortcuts/contract/data/report-renderers.js +414 -0
- package/dist/shortcuts/contract/data/report-spec.js +132 -0
- package/dist/shortcuts/contract/error-actions.js +114 -0
- package/dist/shortcuts/contract/host.js +12 -3
- package/dist/shortcuts/contract/index.js +17 -1
- package/dist/shortcuts/contract/manifest.js +398 -3
- package/dist/shortcuts/contract/ooxml/docx-table.js +48 -0
- package/dist/shortcuts/contract/operations/bi-preview.js +131 -0
- package/dist/shortcuts/contract/operations/bizreview-report.js +496 -0
- package/dist/shortcuts/contract/operations/collection-node.js +229 -0
- package/dist/shortcuts/contract/operations/docx-slots.js +735 -16
- package/dist/shortcuts/contract/operations/draft-build.js +940 -0
- package/dist/shortcuts/contract/operations/draft-submit.js +229 -0
- package/dist/shortcuts/contract/operations/first-screen.js +3 -2
- package/dist/shortcuts/contract/operations/generated-submit.js +175 -0
- package/dist/shortcuts/contract/operations/ledger-report.js +233 -0
- package/dist/shortcuts/contract/operations/ledger-stat.js +1400 -0
- package/dist/shortcuts/contract/operations/ledger.js +4 -1
- package/dist/shortcuts/contract/operations/metrics.js +9 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +527 -0
- package/dist/shortcuts/contract/operations/page.js +9 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +55 -229
- package/dist/shortcuts/contract/operations/registry.js +20 -0
- package/dist/shortcuts/contract/operations/sign-launch.js +256 -0
- package/dist/shortcuts/contract/operations/viewlink.js +334 -0
- package/dist/shortcuts/cowork/index.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +1 -1
- package/dist/shortcuts/ehr/index.js +2 -2
- package/dist/shortcuts/ehr/manifest.js +1 -1
- package/dist/shortcuts/ehr/operations/recruit-position.js +7 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +7 -6
- package/dist/shortcuts/ehr/operations/recruit.js +318 -248
- package/dist/shortcuts/ehr/operations/shared.js +22 -2
- package/dist/shortcuts/esb/index.js +1 -1
- package/dist/shortcuts/fna/index.js +1 -1
- package/dist/shortcuts/fna/manifest.js +1 -0
- package/dist/shortcuts/fna/operations/expense-chart.js +3 -1
- package/dist/shortcuts/hrm/index.js +1 -1
- 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 +3 -3
- 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/jiuchuanhui/index.js +2 -2
- package/dist/shortcuts/jiuchuanhui/manifest.js +3 -0
- package/dist/shortcuts/mail/index.js +2 -2
- package/dist/shortcuts/meeting/index.js +1 -1
- package/dist/shortcuts/meeting/manifest.js +1 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -3
- package/dist/shortcuts/meeting/operations/eb/conflict.js +3 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +10 -9
- package/dist/shortcuts/meeting/operations/eb/factory.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/member-expand.js +3 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +3 -3
- package/dist/shortcuts/meeting/operations/invitation.js +4 -4
- package/dist/shortcuts/meeting/operations/link.js +3 -1
- package/dist/shortcuts/okr/index.js +1 -1
- package/dist/shortcuts/performance/index.js +1 -1
- package/dist/shortcuts/plan/index.js +1 -1
- package/dist/shortcuts/project/index.js +1 -1
- package/dist/shortcuts/reception/manifest.js +2 -2
- package/dist/shortcuts/recruit-stage/context.js +10 -2
- package/dist/shortcuts/recruit-stage/index.js +16 -3
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +17 -8
- package/dist/shortcuts/recruit-stage/operations/list.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +178 -35
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +4 -2
- package/dist/shortcuts/recruit-stage/shared.js +27 -53
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +7 -2
- package/dist/shortcuts/smart-extract/operations/validate.js +4 -1
- package/dist/shortcuts/workflow/index.js +2 -2
- package/dist/shortcuts/workflow/manifest.js +1 -0
- package/dist/shortcuts/workflow/operations/aiDeepRead/render.js +4 -1
- package/dist/shortcuts/workflow/operations/deepRead.js +23 -2
- package/dist/shortcuts/workflow/operations/form.js +8 -2
- package/docs/agent-invoice.md +28 -2
- package/docs/contract.md +6 -1
- package/docs/e10-auth.md +25 -7
- package/docs/invoice.md +60 -9
- package/docs/operation-manual.md +15 -0
- package/package.json +2 -2
- package/skill-template/business-info.json +28 -0
- package/skill-template/domains/jinchengda.md +13 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +3 -3
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +2 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +3 -3
- package/skills/weaver-e10-esb/references/source-manifest.json +3 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +90 -32
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +45 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +68 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +216 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-negotiate.md +215 -0
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +113 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +19 -3
- package/skills/weaver-e10-jinchengda/references/contract-decisions.md +114 -0
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +53 -44
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +200 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +18 -1
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +138 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +158 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +3 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +139 -0
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +10 -3
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +106 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +176 -56
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +123 -0
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +410 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-viewlink.md +110 -0
- package/skills/weaver-e10-jinchengda/references/orchestration.md +38 -24
- package/skills/weaver-e10-meeting/SKILL.md +13 -0
- package/skills/weaver-e10-okr/SKILL.md +11 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +7 -6
- package/skills/weaver-e10-performance/SKILL.md +131 -39
- package/skills/weaver-e10-performance/agents/openai.yaml +48 -17
- package/skills/weaver-e10-performance/references/default-assembly.md +3 -0
- package/skills/weaver-e10-performance/references/extraction-guide.md +17 -3
- package/skills/weaver-e10-performance/references/flow-assess.md +38 -5
- package/skills/weaver-e10-performance/references/scheme-setting-page.md +20 -3
- package/skills/weaver-e10-performance/scripts/assemble_scheme.py +461 -0
- package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +41 -0
- package/skills/weaver-e10-plan/SKILL.md +10 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +2 -2
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-recruit-stage/SKILL.md +230 -202
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +74 -46
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +3 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +201 -36
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +336 -27
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +3 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +15 -1
- package/skills/weaver-e10-recruit-stage/lib/report-attachment.mjs +38 -0
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +5 -1
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +20 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +6 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +32 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +16 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +148 -40
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +32 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +41 -41
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +5 -1
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +41 -28
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +23 -26
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +44 -36
- package/skills/weaver-e10-shared/SKILL.md +40 -5
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +11 -1
- package/skills/weaver-e10-shared/references/json-output-contract.md +144 -8
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +11 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +3 -3
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/references/source-manifest.json +3 -3
- 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/skills/weaver-e10-yepiaotong.zip +0 -0
- package/dist/chunks/chunk-ICP53R52.js +0 -2849
- package/dist/chunks/registry-RIQ67ZT7.js +0 -27
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +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
|
@@ -463,6 +463,7 @@ const quoteContracts = [
|
|
|
463
463
|
inputSchema: readSchema({
|
|
464
464
|
template: { type: 'string', minLength: 1, maxLength: 4096, description: '模板 docx 绝对路径' },
|
|
465
465
|
out: { type: 'string', maxLength: 4096, description: '可选:位点清单 JSON 输出路径' },
|
|
466
|
+
includeText: { type: 'boolean', description: '默认 true:同时返回范文条款骨架 outline/clauses(条款标题、所属段落、关联表格),供按需增删条款;模板很长时可置 false 省上下文' },
|
|
466
467
|
}, ['template']),
|
|
467
468
|
},
|
|
468
469
|
{
|
|
@@ -470,14 +471,18 @@ const quoteContracts = [
|
|
|
470
471
|
risk: 'local-file-write',
|
|
471
472
|
fixed: { local: true, kind: 'docx-slots-fill' },
|
|
472
473
|
inputSchema: readSchema({
|
|
473
|
-
template: { type: 'string', minLength: 1, maxLength: 4096, description: '模板 docx
|
|
474
|
+
template: { type: 'string', minLength: 1, maxLength: 4096, description: '模板 docx 绝对路径(只作参考:版式与固定条款来自它,可扩缩内容由方案决定)' },
|
|
474
475
|
out: { type: 'string', minLength: 1, maxLength: 4096, description: '输出 docx 绝对路径' },
|
|
475
476
|
plan: {
|
|
476
477
|
anyOf: [{ type: 'object' }, { type: 'string' }],
|
|
477
|
-
description: '填充方案:{ slots:[{slotId,value}], details:[{slotId,items,subtotal}], unsupported:[], totals:{grandTotal,installments} };也可传 JSON
|
|
478
|
+
description: '填充方案:{ slots:[{slotId,value}], details:[{slotId,items,subtotal}], regions:[{slotId,rows,subtotal,sumColumn}], clauses:[{op:"insert"|"remove",...}], unsupported:[], totals:{grandTotal,installments} };也可传 JSON 文件路径。'
|
|
479
|
+
+ '**模板只是参考**:regions 的行数由 rows 长度决定(付款计划 1 期 / 2 期 / 3 期…),clauses 可新增或删除条款段落;'
|
|
480
|
+
+ '扫描得到的 table-region 位点(付款计划 / 费用构成)默认必须写(strictRegions),不写即校验 FAIL。'
|
|
481
|
+
+ '金额一律不要手写数值,用值引用 {"$quote":"<报价书解析结果.json 绝对路径>#totals.final_total"}(明细可用 #sections.0.items、小计用 #sections.0.total),真值由本进程读;写 [[MONEY_*]] 报 plan_value_placeholder、写 ¥144,000.00 报 plan_value_display_text,均拒绝写入',
|
|
478
482
|
},
|
|
479
483
|
strict: { type: 'boolean', description: '默认 true:必填位点未覆盖即判不通过' },
|
|
480
|
-
|
|
484
|
+
strictRegions: { type: 'boolean', description: '默认 true:付款计划 / 费用构成等必填区块必须由 plan.regions 显式给出内容(不写即 FAIL,避免退回"照模板填空");排障时可置 false' },
|
|
485
|
+
allowRowInsert: { type: 'boolean', description: '默认 true:明细 / 区块行数不足时克隆已有行补足(不改网格)' },
|
|
481
486
|
}, ['template', 'out', 'plan']),
|
|
482
487
|
},
|
|
483
488
|
{
|
|
@@ -646,6 +651,205 @@ const quoteContracts = [
|
|
|
646
651
|
out: { type: 'string', maxLength: 4096, description: '可选:卡片 JSON 输出路径' },
|
|
647
652
|
}),
|
|
648
653
|
},
|
|
654
|
+
{
|
|
655
|
+
// 单份合同的数据卡片页(ebdf 卡片页):按合同号 / 客户名称在直销合同台账解析唯一一行,
|
|
656
|
+
// 取该行返回的 `id` 拼 `/sp/ebdfpage/card/0/846297265322573825/{数据ID}`,产出可裸输出的 open_web 载荷。
|
|
657
|
+
// 多命中只摊候选、不自动取第一条;0 命中只回「请用户给合同号/客户名称」。
|
|
658
|
+
name: 'contract.viewlink',
|
|
659
|
+
risk: 'read',
|
|
660
|
+
auth: AUTH,
|
|
661
|
+
fixed: { method: 'POST', path: '/api/ebuilder/form/list/getListDatas', ledger: 'contract-viewlink' },
|
|
662
|
+
inputSchema: readSchema({
|
|
663
|
+
keyword: { type: 'string', minLength: 1, description: '合同号(前缀匹配)或客户名称(模糊匹配);与 dataId 二选一' },
|
|
664
|
+
matchBy: {
|
|
665
|
+
type: 'string',
|
|
666
|
+
enum: ['auto', 'contractNo', 'customer'],
|
|
667
|
+
description: '按哪个字段解析;默认 auto:先按合同号 startWith,未命中再按客户名称 like。',
|
|
668
|
+
},
|
|
669
|
+
dataId: { type: 'string', pattern: '^[1-9]\\d*$', description: '已知数据 ID(用户已从候选里选定):给了就跳过查询直接出页面' },
|
|
670
|
+
objId: { type: 'string', pattern: '^[1-9]\\d*$', description: '直销合同 objId;会话内已 list.init 过就传,省一次初始化往返' },
|
|
671
|
+
maxCandidates: { type: 'integer', minimum: 1, maximum: 50, description: '候选返回条数上限,默认 20' },
|
|
672
|
+
title: { type: 'string', description: '打开页面的标题,默认「<合同号> 合同数据卡页」' },
|
|
673
|
+
}),
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
// 发起电子签署(**固定答复口径**):只查一次「该客户未归档的合同」,然后按分支返回固定文案。
|
|
677
|
+
// 不发起任何签署动作、没有写操作;0 条 → 不存在客户合同;多条 → 摊候选让用户选;
|
|
678
|
+
// 唯一确定后:**没上传终稿 → 固定「请先上传终稿合同」**;上传了终稿 → 固定「版本内容不一致」。
|
|
679
|
+
// ⛔ 没有「已按…发起签署」这种分支。
|
|
680
|
+
name: 'contract.sign.launch',
|
|
681
|
+
risk: 'read',
|
|
682
|
+
auth: AUTH,
|
|
683
|
+
fixed: { method: 'POST', path: '/api/ebuilder/form/list/getListDatas', ledger: 'contract-sign-launch' },
|
|
684
|
+
inputSchema: readSchema({
|
|
685
|
+
customer: { type: 'string', minLength: 1, description: '客户名称(必填):查该客户**未归档**(处理进度 notLike 已归档)的合同' },
|
|
686
|
+
contractNo: { type: 'string', description: '用户已从候选里选定的合同号;给了就跳过"多条让用户选"' },
|
|
687
|
+
uploadedFinal: { type: 'boolean', description: '本轮用户**是否实际上传/指定了终稿合同文件**(嘴上说"终稿已确认"不算);true 才返回固定的"版本内容不一致"文案,false 返回"请先上传终稿合同"' },
|
|
688
|
+
finalFile: { type: 'string', description: '终稿文件路径或文件名(给了即视为已上传)' },
|
|
689
|
+
seal: { type: 'string', description: '印章类型,默认「合同专用章」(仅记录在出参里,固定答复不含它)' },
|
|
690
|
+
signOrder: { type: 'string', description: '签署顺序,默认「我方先签 → 客户后签」(仅记录在出参里,固定答复不含它)' },
|
|
691
|
+
maxCandidates: { type: 'integer', minimum: 1, maximum: 50, description: '候选返回条数上限,默认 20' },
|
|
692
|
+
}, ['customer']),
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
// 客户运维合同起草(E10):客户 → 销售合同(多条让用户选)→ 合同总金额 × 百分比 = 运维合同金额
|
|
696
|
+
// → 范文库找系统「年度维护服务合同模板」→ 下载 + 扫描位点 → 生成填充方案(金额走 $quote 值引用)
|
|
697
|
+
// → 调用方继续 slots.fill / quotescreen.submit / open_web。本 operation 只读本地 + 只读接口。
|
|
698
|
+
name: 'contract.ops.draft',
|
|
699
|
+
risk: 'read',
|
|
700
|
+
auth: AUTH,
|
|
701
|
+
fixed: { method: 'POST', path: '/api/ebuilder/form/list/getListDatas', ledger: 'contract-ops-draft' },
|
|
702
|
+
inputSchema: readSchema({
|
|
703
|
+
customer: { type: 'string', minLength: 1, description: '客户全称(必填):查该客户的销售合同作为计费基数' },
|
|
704
|
+
salesContractNo: { type: 'string', description: '用户已选定的销售合同号;给了就跳过"多条让用户选"' },
|
|
705
|
+
percent: { type: 'number', exclusiveMinimum: 0, maximum: 100, description: '计费百分比,默认 10(销售合同总额的 10%)' },
|
|
706
|
+
outDir: { type: 'string', minLength: 1, maxLength: 4096, description: '产物目录(必填):范文 docx / ops.json / plan.json / 生成的合同 docx 都落这里' },
|
|
707
|
+
today: { type: 'string', pattern: '^\\d{4}-\\d{2}-\\d{2}$', description: '仅测试/复核用:以该日期作为签订与生效日期' },
|
|
708
|
+
flow: { type: 'string', description: '合同流程类型(四类之一),默认「老客户增值」;未经用户确认不得直接调 submit' },
|
|
709
|
+
}, ['customer', 'outDir']),
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: 'contract.ledger.stat',
|
|
713
|
+
risk: 'local-file-write',
|
|
714
|
+
fixed: { local: true, kind: 'ledger-stat' },
|
|
715
|
+
inputSchema: readSchema({
|
|
716
|
+
metrics: {
|
|
717
|
+
type: 'array',
|
|
718
|
+
items: { type: 'string' },
|
|
719
|
+
description: '口径键或中文名:signedAmount(签约总额) / contractReceived(合同已收款) / newSignedCustomers(新签客户数) / receiptRate(回款率) / contractPerformance(合同业绩) / eteamsPerformance(eteams业绩)',
|
|
720
|
+
},
|
|
721
|
+
metric: { type: 'string', description: '单口径写法(等价 metrics:[x])' },
|
|
722
|
+
from: { type: 'string', description: '起始月份 YYYY-MM(含)' },
|
|
723
|
+
to: { type: 'string', description: '结束月份 YYYY-MM(含)' },
|
|
724
|
+
periods: { type: 'array', items: { type: 'string' }, description: '显式月份列表;给了就忽略 from/to' },
|
|
725
|
+
compare: { type: 'string', enum: ['yoy', 'none'], description: '对比方式:yoy=去年同期;默认 none' },
|
|
726
|
+
dimension: {
|
|
727
|
+
type: 'string',
|
|
728
|
+
enum: ['date', 'month', 'customer', 'salesman'],
|
|
729
|
+
description: '分组维度:date=签订日期(BI 默认,支持天/月/年)、month=合同业绩年月、customer=客户、salesman=销售经理',
|
|
730
|
+
},
|
|
731
|
+
grain: {
|
|
732
|
+
type: 'string',
|
|
733
|
+
enum: ['day', 'month', 'year'],
|
|
734
|
+
description: 'dimension=date 的时间粒度:day=原值、month(默认)、year',
|
|
735
|
+
},
|
|
736
|
+
person: {
|
|
737
|
+
type: 'object',
|
|
738
|
+
description: '{ id, name }:id 必须是 im.person.resolve 的 uid(传姓名不报错但会串成全量)',
|
|
739
|
+
properties: { id: { type: 'string' }, name: { type: 'string' } },
|
|
740
|
+
},
|
|
741
|
+
people: {
|
|
742
|
+
type: 'array',
|
|
743
|
+
description: '多人员合计(仅 engine=bi):每人 { id, name },合成 OR 组「A 或 B」;人员字段必须给 id',
|
|
744
|
+
items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' } } },
|
|
745
|
+
},
|
|
746
|
+
where: { type: 'array', items: { type: 'string' }, description: '本地过滤(仅 engine=rows),形如 khmc=泛微;!= 表示不含。engine=bi 请改用 filters' },
|
|
747
|
+
filters: {
|
|
748
|
+
type: 'array',
|
|
749
|
+
description: '服务端过滤条件(如 合同种类=新签合同 → 可算「新签合同的签约总额/回款率」);engine=bi 下推、engine=rows 转本地过滤',
|
|
750
|
+
items: {
|
|
751
|
+
type: 'object',
|
|
752
|
+
properties: {
|
|
753
|
+
field: { type: 'string', description: '字段中文名,如 合同种类 / 客户名称' },
|
|
754
|
+
fieldId: { type: 'string', description: '显式字段 ID' },
|
|
755
|
+
dataKey: { type: 'string', description: '显式返回键(engine=rows 需要)' },
|
|
756
|
+
operator: { type: 'string', enum: ['eq', 'like', 'startWith'], description: '默认 eq' },
|
|
757
|
+
value: { type: 'string', description: '取值,如 新签合同 / 续签合同' },
|
|
758
|
+
},
|
|
759
|
+
required: ['value'],
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 200, description: '每页条数,默认 200' },
|
|
763
|
+
maxPages: { type: 'integer', minimum: 1, maximum: 50, description: '单窗最多翻页数,默认 10(2000 条上限)' },
|
|
764
|
+
engine: {
|
|
765
|
+
type: 'string',
|
|
766
|
+
enum: ['rows', 'bi'],
|
|
767
|
+
description: 'rows=明细分页聚合(默认,几十万行会慢);bi=走 E10 BI 聚合接口,一次请求按月出数(需 bi 上下文)',
|
|
768
|
+
},
|
|
769
|
+
bi: {
|
|
770
|
+
type: 'object',
|
|
771
|
+
description: 'engine=bi 时必填:{ pageId, dataSetId, analyzeId, datasetAppId? }',
|
|
772
|
+
properties: {
|
|
773
|
+
pageId: { type: 'string' },
|
|
774
|
+
dataSetId: { type: 'string' },
|
|
775
|
+
analyzeId: { type: 'string' },
|
|
776
|
+
datasetAppId: { type: 'string' },
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
dryRun: { type: 'boolean', description: '只输出查询计划不取数(engine=bi 时输出 BI 配置)' },
|
|
780
|
+
detail: { type: 'boolean', description: '计划里带上 searchParamJson 与条件明细(排查用;默认紧凑形态,避免撑爆 stdout)' },
|
|
781
|
+
out: { type: 'string', maxLength: 4096, description: '把统计结果 JSON 写到该路径,供 contract.ledger.report 直接引用' },
|
|
782
|
+
}, ['metrics']),
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: 'contract.ledger.report',
|
|
786
|
+
risk: 'local-file-write',
|
|
787
|
+
fixed: { local: true, kind: 'ledger-report' },
|
|
788
|
+
inputSchema: readSchema({
|
|
789
|
+
file: { type: 'string', maxLength: 4096, description: 'contract.ledger.stat 的输出 JSON(载荷或 CLI envelope)' },
|
|
790
|
+
data: {
|
|
791
|
+
anyOf: [{ type: 'string' }, { type: 'object' }],
|
|
792
|
+
description: '直接传统计数据(对象或其 JSON 字符串);与 file 二选一',
|
|
793
|
+
},
|
|
794
|
+
out: { type: 'string', minLength: 1, maxLength: 4096, description: '必填:报表 HTML 输出绝对路径' },
|
|
795
|
+
title: { type: 'string', description: '报表标题,默认「合同经营统计报表」' },
|
|
796
|
+
spec: {
|
|
797
|
+
anyOf: [{ type: 'string' }, { type: 'object' }],
|
|
798
|
+
description: '视图 spec(对象或其 JSON 字符串):{blocks:[{kind, metric(s), compare, limit, sort}]};'
|
|
799
|
+
+ 'kind 白名单 kpi / grouped-bar / line / hbar / table;不传则按决策表自动生成',
|
|
800
|
+
},
|
|
801
|
+
}, ['out']),
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'contract.ledger.bi',
|
|
805
|
+
risk: 'read',
|
|
806
|
+
fixed: { kind: 'bi-preview' },
|
|
807
|
+
inputSchema: readSchema({
|
|
808
|
+
pageId: { type: 'string', minLength: 1, description: 'BI 组件 pageId(组件预览地址里的 pageId)' },
|
|
809
|
+
config: {
|
|
810
|
+
anyOf: [{ type: 'string' }, { type: 'object' }],
|
|
811
|
+
description: 'BI 组件配置(dataset / filter / measures / dimensions),可从 BI 设计器的 previewData 请求体复制',
|
|
812
|
+
},
|
|
813
|
+
dataSetId: { type: 'string', description: '数据集 ID;缺省从 config.dataset.dataSetId 推断' },
|
|
814
|
+
analyzeId: { type: 'string', description: '分析 ID;缺省从 config.dataset.analyzeId 推断' },
|
|
815
|
+
datasetAppId: { type: 'string', description: 'datasetAppId,默认 846297243998732291' },
|
|
816
|
+
filter: { type: 'string', description: '页面级筛选 JSON 字符串,默认 []' },
|
|
817
|
+
page: { type: 'string', description: '页面参数,默认 [object Object](与浏览器一致)' },
|
|
818
|
+
isBiAnalyzeCom: { type: 'boolean', description: '默认 true' },
|
|
819
|
+
out: { type: 'string', maxLength: 4096, description: 'BI 原始响应落盘路径(响应较大时取全量用)' },
|
|
820
|
+
timeoutMs: { type: 'integer', minimum: 1000, maximum: 120000, description: '单次请求超时,默认 30000' },
|
|
821
|
+
}, ['pageId', 'config']),
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: 'contract.project.list',
|
|
825
|
+
risk: 'read',
|
|
826
|
+
fixed: { kind: 'project-board-list' },
|
|
827
|
+
inputSchema: readSchema({
|
|
828
|
+
managerId: { type: 'string', pattern: '^\\d{6,32}$', description: '客户经理人员 ID(im.person.resolve 的 uid);项目侧没有销售经理字段,只有客户经理' },
|
|
829
|
+
managerName: { type: 'string', description: '客户经理姓名,仅用于展示' },
|
|
830
|
+
projectName: { type: 'string', description: '按项目名称模糊过滤(可选,当前页面入参未带该条件,仅供扩展)' },
|
|
831
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 20, description: '每页条数,页面硬上限 20' },
|
|
832
|
+
maxPages: { type: 'integer', minimum: 1, maximum: 100, description: '最多翻页数,默认 20;翻到空页自动停止' },
|
|
833
|
+
}, ['managerId']),
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
name: 'contract.collection.node',
|
|
837
|
+
risk: 'local-file-write',
|
|
838
|
+
fixed: { kind: 'collection-node-ledger' },
|
|
839
|
+
inputSchema: readSchema({
|
|
840
|
+
managerId: { type: 'string', pattern: '^\\d{6,32}$', description: '客户经理人员 ID(im.person.resolve 的 uid);与 projectIds 二选一' },
|
|
841
|
+
managerName: { type: 'string', description: '客户经理姓名,用于台账标题与核对' },
|
|
842
|
+
projectIds: { type: 'array', items: { type: 'string' }, description: '项目 ID 数组;给了就跳过①的看板查询' },
|
|
843
|
+
projectName: { type: 'string', description: '自动取项目时按名称模糊过滤(可选)' },
|
|
844
|
+
chunkSize: { type: 'integer', minimum: 1, maximum: 200, description: '项目 ID 分块大小,默认 40(避免 filter 值过长)' },
|
|
845
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 200, description: '台账每页条数,默认 50' },
|
|
846
|
+
maxPages: { type: 'integer', minimum: 1, maximum: 100, description: '每块最多翻页数,默认 20' },
|
|
847
|
+
projectMaxPages: { type: 'integer', minimum: 1, maximum: 100, description: '① 项目列表最多翻页数,默认 20' },
|
|
848
|
+
out: { type: 'string', maxLength: 4096, description: '台账 HTML 输出绝对路径;不给则只返回结构化数据' },
|
|
849
|
+
title: { type: 'string', description: '台账标题,默认「合同台账 · 收款节点」' },
|
|
850
|
+
now: { type: 'string', description: '仅测试/复核用:以该时间作为“今天”计算逾期天数' },
|
|
851
|
+
}),
|
|
852
|
+
},
|
|
649
853
|
{
|
|
650
854
|
name: 'contract.review.report',
|
|
651
855
|
risk: 'local-file-write',
|
|
@@ -663,6 +867,23 @@ const quoteContracts = [
|
|
|
663
867
|
cardId: { type: 'string', description: '报告根节点 id' },
|
|
664
868
|
}, ['out']),
|
|
665
869
|
},
|
|
870
|
+
{
|
|
871
|
+
name: 'contract.bizreview.report',
|
|
872
|
+
risk: 'local-file-write',
|
|
873
|
+
fixed: { local: true, kind: 'bizreview-report' },
|
|
874
|
+
inputSchema: readSchema({
|
|
875
|
+
data: { type: 'string', minLength: 1, maxLength: 4096, description: '必填:商务审核(完备性检查)结论 JSON 路径。结构 { contract?, partyA?, partyB?, standpoint?, reviewDate?, items[{ category?, element, action(add|modify|delete|confirm), status?, severity?, location?, original?, problem?, suggestion?, basis? }], passed[{ element, category?, note? }], notes?[] };结论由模型按合同正文判定后落盘,本 operation 不判风险、不读正文' },
|
|
876
|
+
out: { type: 'string', minLength: 1, maxLength: 4096, description: '必填:报告 HTML 产物输出绝对路径(不出卡片、不注入面板)' },
|
|
877
|
+
dumpData: { type: 'string', maxLength: 4096, description: '可选:把归一化后的报告数据保存到此路径(排查用)' },
|
|
878
|
+
template: { type: 'string', maxLength: 4096, description: '可选:自定义模板路径;缺省用内置模板(与 contract-bizreview-report-template.html 互为镜像)' },
|
|
879
|
+
contract: { type: 'string', description: '合同名称' },
|
|
880
|
+
partyA: { type: 'string', description: '甲方' },
|
|
881
|
+
partyB: { type: 'string', description: '乙方' },
|
|
882
|
+
standpoint: { type: 'string', description: '审核立场,如「我方(乙方)」' },
|
|
883
|
+
reviewDate: { type: 'string', description: '审核日期' },
|
|
884
|
+
cardId: { type: 'string', description: '报告根节点 id' },
|
|
885
|
+
}, ['data', 'out']),
|
|
886
|
+
},
|
|
666
887
|
{
|
|
667
888
|
name: 'contract.elements.build',
|
|
668
889
|
risk: 'local-file-write',
|
|
@@ -911,6 +1132,9 @@ const OPERATION_SUMMARIES = {
|
|
|
911
1132
|
'contract.performance.list.filters': '取履约列表的筛选器定义(可含字段元数据)',
|
|
912
1133
|
'contract.performance.list.query': '查询履约列表数据(按搜索字段/条件/分页,支持多页翻取)',
|
|
913
1134
|
'contract.performance.receipt.query': '按合同编号批量查询履约收款数据',
|
|
1135
|
+
'contract.viewlink': '按合同号/客户名称解析单份合同并生成数据卡片页地址(/sp/ebdfpage/card/0/{objId}/{数据ID});多命中只摊候选不自动选',
|
|
1136
|
+
'contract.sign.launch': '发起电子签署(固定答复口径,不真正发起):查该客户未归档合同 → 0 条报不存在客户合同 / 多条让用户选 / **没上传终稿固定让用户上传** / 上传终稿固定报"版本内容不一致"',
|
|
1137
|
+
'contract.ops.draft': '客户运维合同起草:客户销售合同 × 百分比 = 运维合同金额 → 系统年度维护服务范文 → 下载扫描位点 → 出填充方案与下一步命令(金额走 $quote 引用)',
|
|
914
1138
|
'contract.quote.rmb': '把金额数字转成人民币大写(本地计算,不调接口)',
|
|
915
1139
|
'contract.docx.slots.scan': '扫描 Word 模板的占位槽位并列出;入参 template',
|
|
916
1140
|
'contract.docx.slots.fill': '按计划把内容填入 Word 模板槽位并另存;入参 template/out/plan(写本地文件)',
|
|
@@ -923,7 +1147,13 @@ const OPERATION_SUMMARIES = {
|
|
|
923
1147
|
'contract.ledger.guard': '校验台账合计与明细条件是否一致(防多算/漏算)',
|
|
924
1148
|
'contract.ledger.route': '按查询意图把需求路由到台账菜单与查询条件',
|
|
925
1149
|
'contract.ledger.card': '生成台账卡片页面并写入本地产物;入参 menu/pageId/out',
|
|
1150
|
+
'contract.ledger.stat': '通用问数引擎:按月取数并聚合多个口径,支持与去年同期对比(只读,可 dryRun 只出计划)',
|
|
1151
|
+
'contract.ledger.report': '把合同统计结果按视图 spec 渲染成 HTML 报表并落盘(kpi/grouped-bar/line/hbar/table 五种积木,不传 spec 按决策表组合)',
|
|
1152
|
+
'contract.ledger.bi': '调用 E10 BI 图表聚合预览接口(服务端 SUM/COUNT/分组),适合几十万行级别的统计',
|
|
1153
|
+
'contract.project.list': '按客户经理取未结束项目(项目看板 eblist 查询),返回项目 ID 与合同号',
|
|
1154
|
+
'contract.collection.node': '收款节点台账:客户经理 → 项目 → 付款阶段明细(计划收款日/应收/已收/未收)并出 HTML 台账',
|
|
926
1155
|
'contract.review.report': '生成合同审查报告文档并写到本地;入参 data/out',
|
|
1156
|
+
'contract.bizreview.report': '把合同商务审核(完备性检查:主体/金额/交付/付款等要素齐不齐、说没说清楚)结论渲染成 HTML 报告并落盘,逐条标出原文位置与「补充/修改/删除」建议;入参 data/out',
|
|
927
1157
|
'contract.elements.build': '按分诊结果构建合同要素结构(写本地产物)',
|
|
928
1158
|
'contract.firstscreen.run': '跑合同首屏流程:识别附件并生成首屏结果(写本地产物)',
|
|
929
1159
|
'contract.file.download': '按 fileId 下载合同附件到本地;入参 fileId/savePath(可限最大字节)',
|
|
@@ -931,6 +1161,8 @@ const OPERATION_SUMMARIES = {
|
|
|
931
1161
|
'contract.quote.parse': '解析报价 Excel 明细(可按 sheet 过滤、可保留备注);入参 path',
|
|
932
1162
|
'contract.quote.extract': '从报价文件抽取结构化报价;入参 path',
|
|
933
1163
|
'contract.quote.normalize': '把已有报价数据规范化后输出;入参 data',
|
|
1164
|
+
'contract.draft.build': '把结构化合同大纲渲染成本地 docx 并做六类校验(无模板、不读正文;写本地文件)',
|
|
1165
|
+
'contract.draft.submit': '上传起草的合同、装配要素、存识别记录并返回合同智能页地址(写操作,会落库)',
|
|
934
1166
|
};
|
|
935
1167
|
function withSummaries(operations) {
|
|
936
1168
|
return operations.map((item) => ({
|
|
@@ -938,6 +1170,168 @@ function withSummaries(operations) {
|
|
|
938
1170
|
summary: item.summary || OPERATION_SUMMARIES[item.name] || '',
|
|
939
1171
|
}));
|
|
940
1172
|
}
|
|
1173
|
+
// ---------------------------------------------------------------- ⑨ 智能起草(无模板,本地生成 docx)
|
|
1174
|
+
//
|
|
1175
|
+
// 与报价单转合同的区别:报价单链路是「范文模板 + 位点回填」,**必须有模板**;
|
|
1176
|
+
// 起草链路没有模板,模型给出结构化合同大纲(当事人 / 条款 / 金额 / 付款 / 签署),
|
|
1177
|
+
// CLI 直接渲染 docx 并做六类校验。两条链路互不复用。
|
|
1178
|
+
const draftContracts = [
|
|
1179
|
+
{
|
|
1180
|
+
name: 'contract.draft.build',
|
|
1181
|
+
risk: 'local-file-write',
|
|
1182
|
+
fixed: { local: true, kind: 'draft-build' },
|
|
1183
|
+
inputSchema: readSchema({
|
|
1184
|
+
title: { type: 'string', minLength: 1, maxLength: 400, description: '合同名称(必填,同时决定上传文件名);不要用「合同」这类通用名' },
|
|
1185
|
+
out: { type: 'string', minLength: 1, maxLength: 4096, description: '输出 docx 绝对路径,必须以 .docx 结尾;落盘名会成为上传到 E10 的附件名' },
|
|
1186
|
+
ourParty: {
|
|
1187
|
+
anyOf: [
|
|
1188
|
+
{ type: 'string' },
|
|
1189
|
+
{
|
|
1190
|
+
type: 'object',
|
|
1191
|
+
properties: {
|
|
1192
|
+
name: { type: 'string' }, address: { type: 'string' }, contact: { type: 'string' },
|
|
1193
|
+
phone: { type: 'string' }, email: { type: 'string' }, bank: { type: 'string' }, account: { type: 'string' },
|
|
1194
|
+
},
|
|
1195
|
+
},
|
|
1196
|
+
],
|
|
1197
|
+
description: '我方(乙方):字符串即全称,或 { name, address, contact, phone, email, bank, account };缺省「泛微网络科技股份有限公司」',
|
|
1198
|
+
},
|
|
1199
|
+
counterParty: {
|
|
1200
|
+
anyOf: [
|
|
1201
|
+
{ type: 'string' },
|
|
1202
|
+
{
|
|
1203
|
+
type: 'object',
|
|
1204
|
+
properties: {
|
|
1205
|
+
name: { type: 'string' }, address: { type: 'string' }, contact: { type: 'string' },
|
|
1206
|
+
phone: { type: 'string' }, email: { type: 'string' }, bank: { type: 'string' }, account: { type: 'string' },
|
|
1207
|
+
},
|
|
1208
|
+
},
|
|
1209
|
+
],
|
|
1210
|
+
description: '对方(甲方)当事人全称或对象,**必填**;也是收口时的 customerName',
|
|
1211
|
+
},
|
|
1212
|
+
meta: {
|
|
1213
|
+
type: 'object',
|
|
1214
|
+
properties: {
|
|
1215
|
+
contractNo: { type: 'string' }, signDate: { type: 'string' },
|
|
1216
|
+
signPlace: { type: 'string' }, effectiveDate: { type: 'string' },
|
|
1217
|
+
},
|
|
1218
|
+
description: '合同编号 / 签订日期 / 签订地点 / 生效日期(都以文本原样写入,不猜日期)',
|
|
1219
|
+
},
|
|
1220
|
+
preamble: { type: 'string', maxLength: 4000, description: '合同前言(空行分段)' },
|
|
1221
|
+
recitals: { type: 'array', items: { type: 'string' }, description: '鉴于条款,逐条写入' },
|
|
1222
|
+
articles: {
|
|
1223
|
+
type: 'array',
|
|
1224
|
+
minItems: 1,
|
|
1225
|
+
items: {
|
|
1226
|
+
type: 'object',
|
|
1227
|
+
properties: {
|
|
1228
|
+
heading: { type: 'string', description: '条款标题,如「第一条 合同标的」' },
|
|
1229
|
+
paragraphs: { type: 'array', items: { type: 'string' } },
|
|
1230
|
+
items: {
|
|
1231
|
+
type: 'array',
|
|
1232
|
+
items: {
|
|
1233
|
+
type: 'object',
|
|
1234
|
+
properties: {
|
|
1235
|
+
name: { type: 'string' }, spec: { type: 'string' }, unit: { type: 'string' },
|
|
1236
|
+
qty: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '数量;可用 {"$quote":"<解析结果.json>#sections.0.items.0.qty"} 引用' },
|
|
1237
|
+
price: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '单价;可用 $quote 引用' },
|
|
1238
|
+
amount: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '金额;可用 $quote 引用,缺省时按 单价 × 数量 计算' },
|
|
1239
|
+
},
|
|
1240
|
+
},
|
|
1241
|
+
description: '明细行;金额缺省时按 单价 × 数量 计算',
|
|
1242
|
+
},
|
|
1243
|
+
itemsTitle: { type: 'string', description: '明细表上方的说明文字(可选)' },
|
|
1244
|
+
table: {
|
|
1245
|
+
type: 'object',
|
|
1246
|
+
properties: {
|
|
1247
|
+
headers: { type: 'array', items: { type: 'string' } },
|
|
1248
|
+
rows: { type: 'array', items: { type: 'array', items: { type: 'string' } } },
|
|
1249
|
+
},
|
|
1250
|
+
description: '自定义表格(表头 + 行)',
|
|
1251
|
+
},
|
|
1252
|
+
notes: { type: 'array', items: { type: 'string' } },
|
|
1253
|
+
},
|
|
1254
|
+
required: ['heading'],
|
|
1255
|
+
},
|
|
1256
|
+
description: '合同条款(必填,至少一条);每条至少要有 paragraphs / items / table / notes 之一',
|
|
1257
|
+
},
|
|
1258
|
+
amount: {
|
|
1259
|
+
type: 'object',
|
|
1260
|
+
description: '合同金额。所有金额字段都可写成 {"$quote":"<解析结果.json>#totals.final_total"},真值由本进程读、金额不经过模型上下文;传脱敏占位符或带 ¥ 的展示文本会被专用错误码拒收',
|
|
1261
|
+
properties: {
|
|
1262
|
+
total: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '合同总金额(纯数值或 $quote 引用;不传则按 sections 求和推导)' },
|
|
1263
|
+
inWords: { type: 'string', description: '大写金额;缺省按 total 自动生成' },
|
|
1264
|
+
taxRate: { type: 'string', description: '税率文本,如 "6%";不传则不写含税说明' },
|
|
1265
|
+
sections: {
|
|
1266
|
+
type: 'array',
|
|
1267
|
+
items: {
|
|
1268
|
+
type: 'object',
|
|
1269
|
+
properties: {
|
|
1270
|
+
name: { type: 'string' },
|
|
1271
|
+
amount: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '可用 $quote 引用,如 #sections.0.total' },
|
|
1272
|
+
},
|
|
1273
|
+
},
|
|
1274
|
+
description: '费用构成;求和必须等于 total(误差 ≤ 0.01),否则校验不通过',
|
|
1275
|
+
},
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
payment: {
|
|
1279
|
+
type: 'object',
|
|
1280
|
+
properties: {
|
|
1281
|
+
terms: { type: 'array', items: { type: 'string' } },
|
|
1282
|
+
installments: {
|
|
1283
|
+
type: 'array',
|
|
1284
|
+
items: {
|
|
1285
|
+
type: 'object',
|
|
1286
|
+
properties: {
|
|
1287
|
+
label: { type: 'string' },
|
|
1288
|
+
percent: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '付款比例 0~100;可用 $quote 引用' },
|
|
1289
|
+
amount: { anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }], description: '付款金额;可用 $quote 引用' },
|
|
1290
|
+
dueDate: { type: 'string' },
|
|
1291
|
+
},
|
|
1292
|
+
},
|
|
1293
|
+
description: '付款计划;金额与比例累计必须等于 total(误差 ≤ 0.01)',
|
|
1294
|
+
},
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
signatures: {
|
|
1298
|
+
type: 'object',
|
|
1299
|
+
properties: {
|
|
1300
|
+
ourSigner: { type: 'string' }, counterSigner: { type: 'string' }, datePlace: { type: 'string' },
|
|
1301
|
+
},
|
|
1302
|
+
},
|
|
1303
|
+
attachments: { type: 'array', items: { type: 'string' } },
|
|
1304
|
+
notes: { type: 'array', items: { type: 'string' } },
|
|
1305
|
+
}, ['title', 'out', 'articles']),
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
name: 'contract.draft.submit',
|
|
1309
|
+
risk: 'write',
|
|
1310
|
+
fixed: { local: false, kind: 'draft-submit' },
|
|
1311
|
+
inputSchema: readSchema({
|
|
1312
|
+
contractPath: { type: 'string', minLength: 1, maxLength: 4096, description: 'contract.draft.build 产出的合同 docx 绝对路径(校验必须 PASS)' },
|
|
1313
|
+
flow: { type: 'string', enum: ['契约锁', '新客户', '常规二次销售', '老客户增值'], description: '合同类型;起草链路同样只支持这四个流程' },
|
|
1314
|
+
customerName: { type: 'string', minLength: 1, description: '对方当事人全称(即最终用户)' },
|
|
1315
|
+
totalAmount: {
|
|
1316
|
+
anyOf: [{ type: 'number' }, { type: 'string' }, { type: 'object' }],
|
|
1317
|
+
description: '合同总金额;可传 contract.draft.build 返回的 totalAmount(纯数值)。传脱敏占位符会被 total_amount_placeholder 拒收',
|
|
1318
|
+
},
|
|
1319
|
+
contractTitle: { type: 'string', maxLength: 400, description: '合同名称(= build 的 title);同时决定上传文件名' },
|
|
1320
|
+
fileName: { type: 'string', maxLength: 400, description: '上传文件名;缺省优先取 contractTitle(合同名称决定上传名),未传 contractTitle 时取 contractPath 文件名;通用名会被纠正为规范合同名' },
|
|
1321
|
+
ourCompany: { type: 'string', description: '我方签约主体,默认「泛微网络科技股份有限公司」' },
|
|
1322
|
+
background: { type: 'string', maxLength: 2000, description: '合同背景说明;缺省按标的与金额生成' },
|
|
1323
|
+
buyMode: { type: 'string', description: '购买方式:直签(默认)/ 通过伙伴签署' },
|
|
1324
|
+
signForm: { type: 'string', description: '签约形式:纸质签署(默认)/ 双方电子签署 / 防伪打印签署 / 无需用印 等;取值须在本流程选项表内' },
|
|
1325
|
+
signWay: { type: 'string', description: '合同签订方式:我方先盖章(默认)/ 客户方先盖章 / 等待确认' },
|
|
1326
|
+
signDateType: { type: 'string', description: '合同签署日期:默认合同办理当天(默认)/ 指定签署日期 / 暂不填写' },
|
|
1327
|
+
contractType: { type: 'string', description: '合同类型选项(各流程选项不同,如 e-cology购买 / 续签 / 常规 / 增值);不传则不写' },
|
|
1328
|
+
tab: { type: 'string', enum: ['Extract', 'Summary', 'RiskReview', 'Credit', 'termComponent'], description: '合同智能页页签,默认 Extract' },
|
|
1329
|
+
contractTermIds: { type: 'string', description: '待引用条款 ID,多个逗号拼接;无条款引用不传' },
|
|
1330
|
+
reuseFileId: { type: 'string', description: '已存在的 workflow fileId(仅复用场景);一般不传,由本操作上传产生' },
|
|
1331
|
+
verified: { type: 'boolean', description: 'contract.draft.build 校验是否 PASS;false 时全部 origin 置空,默认 true' },
|
|
1332
|
+
}, ['contractPath', 'flow', 'customerName', 'totalAmount']),
|
|
1333
|
+
},
|
|
1334
|
+
];
|
|
941
1335
|
export const contractOperations = [
|
|
942
1336
|
{
|
|
943
1337
|
name: 'contract.type.tree',
|
|
@@ -2086,6 +2480,7 @@ export const contractOperations = [
|
|
|
2086
2480
|
...contractAssistantOperationContracts,
|
|
2087
2481
|
...performanceContracts,
|
|
2088
2482
|
...quoteContracts,
|
|
2483
|
+
...draftContracts,
|
|
2089
2484
|
];
|
|
2090
2485
|
export const contractManifest = {
|
|
2091
2486
|
schemaVersion: 1,
|
|
@@ -282,6 +282,54 @@ export function insertTableRows(xml, tableIndex, atRow, templateRow, count) {
|
|
|
282
282
|
insertedRange: { startRow: atRow, endRow: atRow + count - 1 },
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
286
|
+
// 段落级动态编辑(2026-11-29 新增,模板动态生成)
|
|
287
|
+
//
|
|
288
|
+
// 背景:旧链路把模板当成「填空表」——只替换占位段落与单元格,条款与表格行数完全由模板
|
|
289
|
+
// 决定,付款计划模板印几行就只能几行。动态生成需要「按需求增删条款、增删表格行」,
|
|
290
|
+
// 因此在这一层补齐三件确定性的原子能力:
|
|
291
|
+
// ① 复制已有段落的段落属性 / run 属性(新段落继承模板版式,不新建样式);
|
|
292
|
+
// ② 在指定段落前后插入段落(按绝对偏移拼接,不重建 XML);
|
|
293
|
+
// ③ 按区间整体删除顶层段落 / 表格(不重建、不重排,保留其余 XML 原样)。
|
|
294
|
+
// 仍然坚持老口径:只做「按边界整体切除 / 按偏移插入」,不重建 `<w:tr>` / `<w:p>` 结构。
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
/** 取值段落属性块 `<w:pPr>…</w:pPr>`(不含则空串)。 */
|
|
297
|
+
export function paragraphPropsXml(pXml) {
|
|
298
|
+
const ranges = collectRanges(pXml, 'w:pPr');
|
|
299
|
+
const first = ranges[0];
|
|
300
|
+
return first ? pXml.slice(first.start, first.end) : '';
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* 取段落首个 run 属性块 `<w:rPr>…</w:rPr>`(段落标记属性也算),用于让新段落继承字体字号。
|
|
304
|
+
* 取不到时返回空串,此时新 run 沿用段落样式的默认格式。
|
|
305
|
+
*/
|
|
306
|
+
export function firstRunPropsXml(pXml) {
|
|
307
|
+
const ranges = collectRanges(pXml, 'w:rPr');
|
|
308
|
+
const first = ranges[0];
|
|
309
|
+
return first ? pXml.slice(first.start, first.end) : '';
|
|
310
|
+
}
|
|
311
|
+
/** 组装一个最小段落:给定段落属性与 run 属性,写入纯文本。 */
|
|
312
|
+
export function makeParagraphXml(propsXml, runPropsXml, text) {
|
|
313
|
+
const pPr = propsXml.includes('<w:pPr') ? propsXml : '';
|
|
314
|
+
const rPr = runPropsXml.includes('<w:rPr') ? runPropsXml : '';
|
|
315
|
+
return `<w:p>${pPr}<w:r>${rPr}<w:t xml:space="preserve">${encodeXml(text)}</w:t></w:r></w:p>`;
|
|
316
|
+
}
|
|
317
|
+
/** 顶层段落区间(不含表格内段落),index 与 `contract.docx.slots.scan` 的 `p{n}` 同源。 */
|
|
318
|
+
export function topParagraphRanges(xml) {
|
|
319
|
+
const tables = collectRanges(xml, 'w:tbl');
|
|
320
|
+
return collectRanges(xml, 'w:p')
|
|
321
|
+
.map((range, index) => ({ kind: 'p', index, start: range.start, end: range.end }))
|
|
322
|
+
.filter((item) => !tables.some((table) => item.start >= table.start && item.end <= table.end));
|
|
323
|
+
}
|
|
324
|
+
/** 顶层表格区间,index 与 `scan` 的 `t{n}` 同源。 */
|
|
325
|
+
export function topTableRanges(xml) {
|
|
326
|
+
return collectRanges(xml, 'w:tbl').map((range, index) => ({
|
|
327
|
+
kind: 'tbl',
|
|
328
|
+
index,
|
|
329
|
+
start: range.start,
|
|
330
|
+
end: range.end,
|
|
331
|
+
}));
|
|
332
|
+
}
|
|
285
333
|
/** 表网格列宽序列(对应 `<w:tblGrid>` 的 gridCol),用于「结构未变」比对。 */
|
|
286
334
|
export function tableGridWidths(xml, tableIndex) {
|
|
287
335
|
const tables = parseTables(xml);
|