weaver-work-cli 0.1.71 → 0.1.75
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-5P33NAUN.js → archive-OZJ6PYUR.js} +14 -9
- package/dist/chunks/{archive-oa-YTY5D7DG.js → archive-oa-BHL5RK2F.js} +10 -7
- package/dist/chunks/{asset-3Q5MFQBX.js → asset-HKRFRQR2.js} +10 -7
- package/dist/chunks/{asset-idle-PQPNYIS7.js → asset-idle-GGIR4KE7.js} +7 -4
- package/dist/chunks/{attachment-content-7CN7JB6B.js → attachment-content-4OV65NK5.js} +3 -3
- package/dist/chunks/{blog-MFHHK6ZR.js → blog-HYDP4DV3.js} +10 -7
- package/dist/chunks/{caizhilian-OZ435AYW.js → caizhilian-JS4RQZ6Z.js} +10 -7
- package/dist/chunks/{calendar-TNJXS5UC.js → calendar-SWRY4DIT.js} +10 -7
- package/dist/chunks/chunk-257JXJGD.js +30 -0
- package/dist/chunks/{chunk-FRMDHZSN.js → chunk-2AUFKU2D.js} +11 -11
- package/dist/chunks/chunk-2BZ7TY4M.js +49 -0
- package/dist/chunks/{chunk-WM33BSIL.js → chunk-2QCCXPNU.js} +1 -1
- package/dist/chunks/{chunk-X2C5CGGM.js → chunk-4FCBEWNB.js} +74 -68
- package/dist/chunks/{chunk-YN5SD4TX.js → chunk-5D2V7ZAN.js} +2 -2
- package/dist/chunks/{chunk-UPVAQJKS.js → chunk-5QUTQHXF.js} +282 -158
- package/dist/chunks/{chunk-SKWKCLJX.js → chunk-5ZJGPEIB.js} +2 -2
- package/dist/chunks/chunk-7DE3VMZD.js +35 -0
- package/dist/chunks/chunk-BNKUHN4N.js +1346 -0
- package/dist/chunks/{chunk-VMVMEIL3.js → chunk-BSR5TM7U.js} +4 -4
- package/dist/chunks/{chunk-EJLP63UO.js → chunk-ERZY6GYL.js} +7 -3
- package/dist/chunks/{chunk-OFCF23FY.js → chunk-FEZK536Z.js} +25 -9
- package/dist/chunks/{chunk-Q3EXRNB4.js → chunk-I6NOHKEK.js} +1 -1
- package/dist/chunks/{chunk-OZ7CJC7W.js → chunk-J7FAAHWH.js} +2 -2
- package/dist/chunks/{chunk-6MMSLE6K.js → chunk-JJONWB5N.js} +16 -2
- package/dist/chunks/chunk-JOY3HZXL.js +467 -0
- package/dist/chunks/{chunk-2DNCKZRX.js → chunk-JWF2R6EQ.js} +0 -462
- package/dist/chunks/{chunk-ICNUOWLL.js → chunk-KEA4XQPO.js} +4 -4
- package/dist/chunks/chunk-KINXYJXM.js +205 -0
- package/dist/chunks/{chunk-VJWVB55R.js → chunk-KWJEICD4.js} +2 -2
- package/dist/chunks/{chunk-P3AFNAJ6.js → chunk-LJI4N6FV.js} +1 -1
- package/dist/chunks/{chunk-DRJYPXKC.js → chunk-MXCRKXOP.js} +48 -6
- package/dist/chunks/{chunk-OPTJ6IF7.js → chunk-NWYHCZTY.js} +1 -1
- package/dist/chunks/chunk-OJ4JPD25.js +428 -0
- package/dist/chunks/{chunk-B4NINGP2.js → chunk-OQCK5SAU.js} +2 -2
- package/dist/chunks/chunk-PG5YSNYY.js +1166 -0
- package/dist/chunks/{chunk-LU2SPJYY.js → chunk-QJWVYOOV.js} +2 -2
- package/dist/chunks/{chunk-SUWR5QEG.js → chunk-QVKRNL7L.js} +287 -305
- package/dist/chunks/chunk-SU6IJD6D.js +49 -0
- package/dist/chunks/{chunk-MD5RXRI3.js → chunk-TA2RBUTH.js} +2 -2
- package/dist/chunks/{chunk-SSS75WXW.js → chunk-U6Y32KEV.js} +2 -2
- package/dist/chunks/chunk-UUJK76HV.js +209 -0
- package/dist/chunks/{chunk-GB2MCJPG.js → chunk-VOMDD2C5.js} +1 -1
- package/dist/chunks/chunk-Y3C6MDL7.js +28 -0
- package/dist/chunks/chunk-ZM7RN2IM.js +38 -0
- package/dist/chunks/{chunk-G7ZM2VOX.js → chunk-ZUB4M4N3.js} +38 -36
- package/dist/chunks/{chunk-XLSJC6JZ.js → chunk-ZWIMLT6P.js} +8 -7
- package/dist/chunks/cli-FULPXIKJ.js +226 -0
- package/dist/chunks/commands-BNWFNTD3.js +70 -0
- package/dist/chunks/{conflict-Y4PXZ2YQ.js → conflict-5BKCDV2F.js} +2 -2
- package/dist/chunks/{contract-C3BGUMBM.js → contract-WI23OXVC.js} +12446 -5964
- package/dist/chunks/{cowork-2AWG4QLA.js → cowork-DZBBVNMQ.js} +11 -8
- package/dist/chunks/{create-flow-LOUOK46Z.js → create-flow-7ZRBRKX7.js} +6 -6
- package/dist/chunks/{data-BSFYMXVO.js → data-PAZVE6QE.js} +6 -3
- package/dist/chunks/{ebuilder-form-LAAMTD2Y.js → ebuilder-form-5SQXIGXN.js} +9 -6
- package/dist/chunks/{ehr-36KEX5SH.js → ehr-CX5F4ZAU.js} +27 -19
- package/dist/chunks/{entry-mode-6N2IGCS4.js → entry-mode-I2BYNONZ.js} +3 -3
- package/dist/chunks/{env-QYLS3EB3.js → env-ZAQZ7EHN.js} +2 -2
- package/dist/chunks/{esb-PTYS3E67.js → esb-DQTXDIBF.js} +10 -7
- package/dist/chunks/{factory-LPFPKZ4T.js → factory-XRI6KZ7H.js} +1 -1
- package/dist/chunks/{fna-JNHCLRDE.js → fna-FK6HQVJL.js} +13 -8
- package/dist/chunks/{group-chat-QP2WX4QJ.js → group-chat-MLWNYM2P.js} +3 -3
- package/dist/chunks/{host-C2BLBIID.js → host-3EPREGXS.js} +6 -3
- package/dist/chunks/{host-QXFKQXNX.js → host-J74JGYAW.js} +6 -3
- package/dist/chunks/{host-57LSRSE7.js → host-KUMU3DDK.js} +6 -3
- package/dist/chunks/{host-7BVR7CQ3.js → host-MEC4VQZA.js} +6 -3
- package/dist/chunks/{host-NS36QFLR.js → host-T6NNQGVZ.js} +6 -3
- package/dist/chunks/{host-K2ZKNXME.js → host-VI7Q45PM.js} +6 -3
- package/dist/chunks/{hrm-FSGO4NSH.js → hrm-KKVAW4P5.js} +8 -5
- package/dist/chunks/{im-2BFGS2XO.js → im-47CIWQNL.js} +7 -4
- package/dist/chunks/{invoice-JKLTTHSZ.js → invoice-CDYRBNIG.js} +21 -16
- package/dist/chunks/{jiuchuanhui-PTABJE7V.js → jiuchuanhui-M7QTRHZK.js} +17 -10
- package/dist/chunks/{lazy-dispatch-YN2ZP3CS.js → lazy-dispatch-FKQJZFI5.js} +22 -8
- package/dist/chunks/{mail-YNO7ZZUK.js → mail-NRBS5N6Y.js} +11 -8
- package/dist/chunks/{meeting-NIDHDBCB.js → meeting-WC5LD3IO.js} +22 -18
- package/dist/chunks/{minute-doc-G3QAT7DE.js → minute-doc-OQUMDTKG.js} +4 -4
- package/dist/chunks/{okr-QC52G6AJ.js → okr-EHKSKMPL.js} +10 -7
- package/dist/chunks/{operations-MQV32ITT.js → operations-V5VM5MS2.js} +7 -4
- package/dist/chunks/{performance-3MQ3AHDQ.js → performance-ZJADXJPN.js} +6 -3
- package/dist/chunks/{plan-ISINIEPY.js → plan-OTDNBDJ7.js} +10 -7
- package/dist/chunks/{project-IJ6DVKT7.js → project-4XVBQ3HX.js} +10 -7
- package/dist/chunks/{reception-3H5LUG2I.js → reception-3FAHOOH7.js} +118 -45
- package/dist/chunks/{recruit-stage-MIOJXP6W.js → recruit-stage-3WTVWW2K.js} +1056 -191
- package/dist/chunks/register-SQOPIR2G.js +16 -0
- package/dist/chunks/{registry-3S7AVMXR.js → registry-F4YFZLOD.js} +7 -3
- package/dist/chunks/registry-NBTBXR4L.js +30 -0
- package/dist/chunks/{registry-NHHKOEU3.js → registry-TJGCVRCW.js} +7 -4
- package/dist/chunks/{room-recommend-IOKBJVYP.js → room-recommend-KL62XB2Y.js} +4 -4
- package/dist/chunks/root-YZG2TS5W.js +16 -0
- package/dist/chunks/{schedule-IB6EUARH.js → schedule-XOISYUPB.js} +4 -4
- package/dist/chunks/{smart-extract-N2TK3CEF.js → smart-extract-UYGNV3BM.js} +15 -7
- package/dist/chunks/update-AV5VOXGY.js +13 -0
- package/dist/chunks/{workflow-RINBAL2M.js → workflow-V54LJPXL.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 +12 -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 +11 -5
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +10 -9
- package/dist/shortcuts/ehr/operations/recruit.js +390 -196
- package/dist/shortcuts/ehr/operations/shared.js +51 -0
- 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/index.js +1 -1
- 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/constants.js +22 -0
- package/dist/shortcuts/reception/index.js +4 -0
- package/dist/shortcuts/reception/manifest.js +16 -2
- package/dist/shortcuts/reception/operations/doc.js +24 -11
- package/dist/shortcuts/reception/operations/docrender.js +18 -1
- package/dist/shortcuts/reception/operations/render-assets.js +93 -22
- package/dist/shortcuts/recruit-stage/context.js +22 -8
- package/dist/shortcuts/recruit-stage/index.js +16 -3
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +20 -11
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +467 -26
- package/dist/shortcuts/recruit-stage/operations/list.js +73 -2
- package/dist/shortcuts/recruit-stage/operations/profile.js +13 -5
- package/dist/shortcuts/recruit-stage/operations/registry.js +18 -2
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +363 -54
- package/dist/shortcuts/recruit-stage/operations/search.js +80 -16
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +124 -0
- package/dist/shortcuts/recruit-stage/shared.js +174 -56
- 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 +44 -4
- package/docs/contract.md +6 -1
- package/docs/e10-auth.md +25 -7
- package/docs/operation-manual.md +15 -0
- package/package.json +2 -2
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
- package/skill-template/business-info.json +28 -0
- package/skill-template/domains/jinchengda.md +13 -1
- 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-jucailin/SKILL.md +7 -3
- package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
- 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-reception-flow/SKILL.md +97 -41
- package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +533 -137
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +103 -62
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +282 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +331 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +865 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +162 -11
- 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 +6 -2
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +26 -21
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +33 -27
- 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 +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +22 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +42 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +87 -50
- 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 +48 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +45 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +17 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +162 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +55 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +75 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +80 -46
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +10 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +15 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +7 -3
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +119 -0
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +322 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +166 -76
- 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/references/source-manifest.json +5 -5
- package/dist/chunks/chunk-MZVQKQP5.js +0 -2849
- package/dist/chunks/registry-3GQRYP2R.js +0 -27
- package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
|
@@ -4,56 +4,106 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>人岗匹配评估报告</title>
|
|
7
|
-
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js"></script>
|
|
8
7
|
<style>
|
|
8
|
+
|
|
9
9
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
10
|
-
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
.header
|
|
14
|
-
.header
|
|
15
|
-
.
|
|
16
|
-
.summary-
|
|
17
|
-
.summary-card
|
|
18
|
-
.summary-card
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
.candidate-
|
|
22
|
-
.candidate-
|
|
23
|
-
.candidate-
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
33
|
-
.
|
|
34
|
-
.
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
.
|
|
38
|
-
.
|
|
39
|
-
.
|
|
40
|
-
.
|
|
41
|
-
.
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
|
|
10
|
+
body { background: #f5f5f5; color: #333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.6; }
|
|
11
|
+
/* 宽度自适应右侧面板:最大 1000,面板更窄时铺满;不按视口切列数。 */
|
|
12
|
+
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 18px 14px 28px; }
|
|
13
|
+
.header { background: #fff; border: 1px solid #e5e5e5; border-left: 3px solid #5d9cec; border-radius: 4px; padding: 14px 18px; margin-bottom: 12px; }
|
|
14
|
+
.header h1 { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 2px; }
|
|
15
|
+
.header .subtitle { font-size: 13px; color: #959595; }
|
|
16
|
+
.summary-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; overflow: hidden; }
|
|
17
|
+
.summary-card { min-width: 0; padding: 11px 12px; background: linear-gradient(180deg, #eaf4ff 0%, #f7fbff 100%); border-left: 1px solid #d7e8fb; }
|
|
18
|
+
.summary-card:first-child { border-left: none; }
|
|
19
|
+
.summary-card .label { font-size: 13px; color: #7a8797; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
20
|
+
.summary-card .value { font-size: 20px; font-weight: 600; color: #1f4e79; }
|
|
21
|
+
.candidate-section { background: #fff; border: 1px solid #e5e5e5; border-radius: 4px; padding: 14px 14px; margin-bottom: 12px; }
|
|
22
|
+
.candidate-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
|
|
23
|
+
.candidate-header > div:first-child { flex: 1 1 200px; min-width: 0; }
|
|
24
|
+
.candidate-header > div:nth-child(2) { flex: 0 1 auto; min-width: 0; max-width: 46%; text-align: right; }
|
|
25
|
+
.candidate-name { font-size: 16px; font-weight: 600; }
|
|
26
|
+
.candidate-name a { color: #333; text-decoration: none; }
|
|
27
|
+
.candidate-name a:hover { color: #5d9cec; }
|
|
28
|
+
.score-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 2px; }
|
|
29
|
+
.score-high { background: #f6ffed; color: #52c41a; }
|
|
30
|
+
.score-medium { background: #fffbe6; color: #d48806; }
|
|
31
|
+
.score-low { background: #fff1f0; color: #ff4d4f; }
|
|
32
|
+
.candidate-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
|
|
33
|
+
.radar-chart { width: 100%; padding: 2px 0; }
|
|
34
|
+
.bar { display: grid; grid-template-columns: 62px 1fr 30px; gap: 8px; align-items: center; margin: 9px 0; font-size: 12px; }
|
|
35
|
+
.bar .bn { color: #666; }
|
|
36
|
+
.bar .bt { height: 6px; background: #f0f0f0; border-radius: 2px; overflow: hidden; }
|
|
37
|
+
.bar .bt i { display: block; height: 6px; border-radius: 2px; }
|
|
38
|
+
.bar .bv { text-align: right; color: #333; font-variant-numeric: tabular-nums; }
|
|
39
|
+
.match-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
|
40
|
+
.match-table th { text-align: left; font-size: 12px; color: #959595; padding: 6px 8px; background: #f7f7f7; border-bottom: 1px solid #e5e5e5; font-weight: 400; }
|
|
41
|
+
.match-table th:first-child { width: 78px; }
|
|
42
|
+
.match-table th:nth-child(2) { width: 56px; }
|
|
43
|
+
.match-table td { padding: 7px 8px; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
|
|
44
|
+
.match-table .dim-name { font-weight: 600; white-space: nowrap; }
|
|
45
|
+
.match-table .evidence { color: #666; overflow-wrap: anywhere; word-break: break-word; }
|
|
46
|
+
.match-table .level { font-weight: 600; text-align: center; width: 52px; }
|
|
47
|
+
.level-high { color: #52c41a; }
|
|
48
|
+
.level-medium { color: #d48806; }
|
|
49
|
+
.level-low { color: #ff4d4f; }
|
|
50
|
+
.candidate-basic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 10px; font-size: 13px; color: #777; margin-top: 5px; }
|
|
51
|
+
.candidate-basic span { margin-right: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
52
|
+
.req-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
|
|
53
|
+
.req-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 10px; border-radius: 3px; background: #ecf5ff; color: #2b5c8a; font-size: 13px; line-height: 1.5; }
|
|
54
|
+
.table-scroll { width: 100%; overflow-x: auto; }
|
|
55
|
+
.comparison-table { width: 100%; min-width: 760px; border-collapse: collapse; margin-top: 4px; }
|
|
56
|
+
.comparison-table th { background: #f7f7f7; padding: 8px; font-size: 12px; text-align: left; color: #666; font-weight: 400; border-bottom: 1px solid #e5e5e5; }
|
|
57
|
+
.comparison-table td { padding: 8px; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
|
|
58
|
+
.comparison-table .rank { font-weight: 600; color: #5d9cec; }
|
|
59
|
+
|
|
60
|
+
.rule-btn { border: 1px solid #d9ecff; background: #ecf5ff; color: #2b6cb0; font-size: 13px; padding: 4px 10px; border-radius: 2px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
|
|
61
|
+
.rule-btn:hover { background: #ddedff; }
|
|
62
|
+
.hd-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
|
|
63
|
+
.hd-row > div:first-child { flex: 1; min-width: 0; }
|
|
64
|
+
.score-big { font-size: 34px; font-weight: 700; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
|
|
65
|
+
.score-big small { font-size: 13px; color: #959595; font-weight: 400; margin-left: 2px; }
|
|
66
|
+
.rank-no { font-size: 11px; color: #959595; margin-top: 2px; }
|
|
67
|
+
.modal[hidden] { display: none; }
|
|
68
|
+
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
|
|
69
|
+
.modal-box { background: #fff; border-radius: 4px; max-width: 720px; width: 100%; max-height: 86vh; overflow: auto; }
|
|
70
|
+
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f0f0f0; font-size: 15px; font-weight: 600; }
|
|
71
|
+
.modal-x { border: none; background: none; font-size: 18px; line-height: 1; color: #959595; cursor: pointer; }
|
|
72
|
+
.modal-bd { padding: 14px 18px 18px; }
|
|
73
|
+
.m-note { font-size: 12px; color: #666; line-height: 1.8; margin-bottom: 10px; }
|
|
74
|
+
.rule-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
|
|
75
|
+
.rule-table th { background: #f7f7f7; text-align: left; padding: 6px 8px; color: #666; font-weight: 400; border-bottom: 1px solid #e5e5e5; }
|
|
76
|
+
.rule-table td { padding: 6px 8px; border-bottom: 1px solid #f5f5f5; color: #333; vertical-align: top; }
|
|
77
|
+
.rule-table td:first-child { white-space: nowrap; font-weight: 600; }
|
|
78
|
+
|
|
79
|
+
.footer { text-align: center; padding: 18px; color: #959595; font-size: 12px; line-height: 1.8; }
|
|
80
|
+
|
|
47
81
|
</style>
|
|
48
82
|
</head>
|
|
49
83
|
<body>
|
|
50
84
|
<div class="container">
|
|
51
85
|
<div class="header">
|
|
52
|
-
<
|
|
53
|
-
|
|
86
|
+
<div class="hd-row">
|
|
87
|
+
<div>
|
|
88
|
+
<h1>人岗匹配评估报告</h1>
|
|
89
|
+
<div class="subtitle" id="subtitle">岗位:— | 候选人:— | AI 评估(非系统评分)</div>
|
|
90
|
+
</div>
|
|
91
|
+
<button class="rule-btn" id="ruleBtn" type="button">评分规则</button>
|
|
92
|
+
</div>
|
|
54
93
|
</div>
|
|
55
94
|
<div class="summary-bar" id="summaryBar"></div>
|
|
95
|
+
<div id="requirementBox"></div>
|
|
56
96
|
<div id="candidates"></div>
|
|
97
|
+
<div class="modal" id="ruleModal" hidden>
|
|
98
|
+
<div class="modal-box">
|
|
99
|
+
<div class="modal-hd"><span>匹配度是怎么算的</span><button class="modal-x" id="ruleClose" type="button">×</button></div>
|
|
100
|
+
<div class="modal-bd">
|
|
101
|
+
<p class="m-note">六个维度各按 0–100 打分,综合分由 AI 结合维度得分、岗位要求与证据强度判断,<b>不是简单平均</b>。分档:≥75 推荐、50–74 可考虑、<50 不推荐。</p>
|
|
102
|
+
<table class="rule-table"><thead><tr><th>维度</th><th>判断依据</th></tr></thead><tbody id="ruleBody"></tbody></table>
|
|
103
|
+
<p class="m-note">证据只取候选人档案中的工作经历、项目经历原文;档案没有的字段记「—」,不做推断、不补造。匹配度是 AI 评估,不写入系统、不落库,也不作为录用决策的唯一依据。</p>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
57
107
|
<div class="footer">
|
|
58
108
|
本报告由 AI 基于候选人档案与岗位要求生成,匹配度仅供参考,不作为录用决策的唯一依据。<br>
|
|
59
109
|
评估维度:学历匹配 / 经验年限 / 技能覆盖 / 行业相关 / 职位方向 / 稳定性
|
|
@@ -62,20 +112,46 @@ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-
|
|
|
62
112
|
<script>
|
|
63
113
|
// === 数据注入区(Agent 生成 HTML 时替换此段) ===
|
|
64
114
|
const REPORT_DATA = __REPORT_DATA_PLACEHOLDER__;
|
|
65
|
-
//
|
|
66
|
-
// { position: "制造业解决方案经理", baseUrl: "https://...", candidates: [{ talentId, name, basic: {degree, college,
|
|
115
|
+
// 结构(basic 键名对齐 recruit-stage.candidate.profile 输出):
|
|
116
|
+
// { position: "制造业解决方案经理", baseUrl: "https://...", candidates: [{ talentId, name, basic: {degree, college, joinworkdate, current_position, current_industry}, scores: {education:85, experience:70, skills:60, industry:90, position:75, stability:80}, evidence: {education:"硕士,符合要求", ...}, overall: 78, level: "medium" }] }
|
|
117
|
+
// 工作年限由 joinworkdate(参工时间)在页面侧折算;缺参工时间则不展示年限,不要编造。
|
|
67
118
|
|
|
68
119
|
const DIMENSIONS = [
|
|
69
|
-
{ key: 'education', name: '学历匹配' },
|
|
70
|
-
{ key: 'experience', name: '经验年限' },
|
|
71
|
-
{ key: 'skills', name: '技能覆盖' },
|
|
72
|
-
{ key: 'industry', name: '行业相关' },
|
|
73
|
-
{ key: 'position', name: '职位方向' },
|
|
74
|
-
{ key: 'stability', name: '稳定性' },
|
|
120
|
+
{ key: 'education', name: '学历匹配', desc: '岗位要求学历(本科/硕士等)与候选人最高学历比对,专业与岗位的相关度也计入' },
|
|
121
|
+
{ key: 'experience', name: '经验年限', desc: '岗位要求年限 vs 参工时间折算的实际年限;只按档案日期算,不猜' },
|
|
122
|
+
{ key: 'skills', name: '技能覆盖', desc: 'JD 关键技能(技术栈/工具/方法)在项目与工作描述里的实际出现频次和深度' },
|
|
123
|
+
{ key: 'industry', name: '行业相关', desc: '岗位所属行业与候选人服务过的客户、行业、业务场景的重合度' },
|
|
124
|
+
{ key: 'position', name: '职位方向', desc: '岗位方向与候选人历史职位、职责的连续性;跨方向转岗会明显扣分' },
|
|
125
|
+
{ key: 'stability', name: '稳定性', desc: '每段经历时长与更换频率;单段少於 6 个月视为偏短,连续多段偏短会拉低' },
|
|
75
126
|
];
|
|
76
127
|
|
|
128
|
+
// 键名兼容:scores / evidence 允许英文 key(education…)或中文 key(学历/经验/技能/行业/方向/稳定)
|
|
129
|
+
const DIM_ALIAS = {
|
|
130
|
+
education: ['education', '学历', '学历匹配'],
|
|
131
|
+
experience: ['experience', '经验', '经验年限'],
|
|
132
|
+
skills: ['skills', '技能', '技能覆盖'],
|
|
133
|
+
industry: ['industry', '行业', '行业相关'],
|
|
134
|
+
position: ['position', '方向', '职位方向', '职位相关'],
|
|
135
|
+
stability: ['stability', '稳定', '稳定性'],
|
|
136
|
+
};
|
|
137
|
+
function pick(obj, key) {
|
|
138
|
+
if (!obj) return undefined;
|
|
139
|
+
for (const a of (DIM_ALIAS[key] || [key])) {
|
|
140
|
+
if (obj[a] !== undefined && obj[a] !== null && obj[a] !== '') return obj[a];
|
|
141
|
+
}
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
function scoreOf(c, key) { const v = Number(pick(c.scores, key)); return Number.isFinite(v) ? v : 0; }
|
|
145
|
+
function evOf(c, key) { const v = pick(c.evidence, key); return v === undefined ? '—' : v; }
|
|
146
|
+
|
|
77
147
|
function levelClass(score) { return score >= 75 ? 'level-high' : score >= 50 ? 'level-medium' : 'level-low'; }
|
|
78
148
|
function levelText(score) { return score >= 75 ? '高' : score >= 50 ? '中' : '低'; }
|
|
149
|
+
function yearsOfService(joinDate) {
|
|
150
|
+
if (!joinDate) return '';
|
|
151
|
+
const d = new Date(String(joinDate).replace(/-/g, '/'));
|
|
152
|
+
if (isNaN(d.getTime())) return '';
|
|
153
|
+
return Math.max(0, Math.floor((Date.now() - d.getTime()) / 31557600000));
|
|
154
|
+
}
|
|
79
155
|
function badgeClass(overall) { return overall >= 75 ? 'score-high' : overall >= 50 ? 'score-medium' : 'score-low'; }
|
|
80
156
|
function badgeText(overall) { return overall >= 75 ? '推荐' : overall >= 50 ? '可考虑' : '不推荐'; }
|
|
81
157
|
|
|
@@ -93,28 +169,40 @@ function renderReport(data) {
|
|
|
93
169
|
{ label: '评估维度', value: '6 维度' },
|
|
94
170
|
].map(s => `<div class="summary-card"><div class="label">${s.label}</div><div class="value">${s.value}</div></div>`).join('');
|
|
95
171
|
|
|
172
|
+
// 岗位要求基准(AI 推导;系统内无此在招岗位时,用它作为评估基准并在报告里如实标注)
|
|
173
|
+
const reqBox = document.getElementById('requirementBox');
|
|
174
|
+
if (reqBox && data.requirements && data.requirements.length) {
|
|
175
|
+
reqBox.innerHTML = `<div class="candidate-section">
|
|
176
|
+
<div class="candidate-header"><div class="candidate-name">岗位要求基准<span style="font-size:12px;color:#999;font-weight:400;margin-left:8px">(AI 按岗位名推导,非系统内 JD)</span></div></div>
|
|
177
|
+
<div class="req-list">${data.requirements.map(r => `<span class="req-chip">${r}</span>`).join('')}</div></div>`;
|
|
178
|
+
}
|
|
179
|
+
|
|
96
180
|
// 排序:总分降序
|
|
97
181
|
const sorted = [...data.candidates].sort((a, b) => b.overall - a.overall);
|
|
98
182
|
|
|
99
183
|
const container = document.getElementById('candidates');
|
|
100
184
|
container.innerHTML = sorted.map((c, idx) => {
|
|
101
|
-
const cardUrl = `${data.baseUrl}/sp/
|
|
185
|
+
const cardUrl = `${data.baseUrl}/sp/ebdpage/view/1343164177628012608?talentId=${c.talentId}`;
|
|
186
|
+
const basic = c.basic || {};
|
|
187
|
+
const lw = c.latestWork || {};
|
|
188
|
+
const workYears = yearsOfService(basic.joinworkdate || c.earliestJoin || '');
|
|
102
189
|
return `
|
|
103
190
|
<div class="candidate-section">
|
|
104
191
|
<div class="candidate-header">
|
|
105
192
|
<div>
|
|
106
193
|
<div class="candidate-name"><a href="${cardUrl}" target="_blank">${c.name}</a></div>
|
|
107
194
|
<div class="candidate-basic">
|
|
108
|
-
<span>学历:${
|
|
109
|
-
<span>院校:${
|
|
110
|
-
|
|
111
|
-
<span>当前职位:${
|
|
195
|
+
<span>学历:${basic.degree || '—'}</span>
|
|
196
|
+
<span>院校:${basic.college || '—'}</span>
|
|
197
|
+
${workYears !== '' ? `<span>工作年限:约 ${workYears} 年</span>` : ''}
|
|
198
|
+
<span>当前职位:${basic.current_position || lw.work_position || '—'}</span>
|
|
199
|
+
<span>当前公司:${lw.co_name || basic.current_industry || '—'}</span>
|
|
112
200
|
</div>
|
|
113
201
|
</div>
|
|
114
202
|
<div style="text-align:right">
|
|
115
203
|
<div class="score-badge ${badgeClass(c.overall)}">${badgeText(c.overall)}</div>
|
|
116
|
-
<div style="
|
|
117
|
-
<div
|
|
204
|
+
<div class="score-big" style="color:${c.overall>=75?'#52c41a':c.overall>=50?'#d48806':'#ff4d4f'}">${c.overall}<small>/100</small></div>
|
|
205
|
+
<div class="rank-no">排名 #${idx+1}</div>
|
|
118
206
|
</div>
|
|
119
207
|
</div>
|
|
120
208
|
<div class="candidate-body">
|
|
@@ -124,9 +212,9 @@ function renderReport(data) {
|
|
|
124
212
|
<thead><tr><th>维度</th><th style="width:60px">等级</th><th>匹配证据</th></tr></thead>
|
|
125
213
|
<tbody>
|
|
126
214
|
${DIMENSIONS.map(d => {
|
|
127
|
-
const score = c
|
|
128
|
-
const ev = c
|
|
129
|
-
return `<tr><td class="dim-name">${d.name}</td><td class="level ${levelClass(score)}">${levelText(score)}</td><td class="evidence">${ev}</td></tr>`;
|
|
215
|
+
const score = scoreOf(c, d.key);
|
|
216
|
+
const ev = evOf(c, d.key);
|
|
217
|
+
return `<tr><td class="dim-name" title="${d.desc}">${d.name}</td><td class="level ${levelClass(score)}">${levelText(score)}</td><td class="evidence">${ev}</td></tr>`;
|
|
130
218
|
}).join('')}
|
|
131
219
|
</tbody>
|
|
132
220
|
</table>
|
|
@@ -135,24 +223,15 @@ function renderReport(data) {
|
|
|
135
223
|
</div>`;
|
|
136
224
|
}).join('');
|
|
137
225
|
|
|
138
|
-
//
|
|
226
|
+
// 六维横条(纯 CSS,无外网依赖,打开即出)
|
|
139
227
|
sorted.forEach(c => {
|
|
140
228
|
const el = document.getElementById(`radar-${c.talentId}`);
|
|
141
229
|
if (!el) return;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
axisName: { color: '#666', fontSize: 11 },
|
|
148
|
-
splitArea: { areaStyle: { color: ['#fff', '#f5f6fa'] } },
|
|
149
|
-
splitLine: { lineStyle: { color: '#e0e0e0' } },
|
|
150
|
-
},
|
|
151
|
-
series: [{
|
|
152
|
-
type: 'radar',
|
|
153
|
-
data: [{ value: DIMENSIONS.map(d => c.scores[d.key] || 0), name: c.name, areaStyle: { color: 'rgba(31,95,224,0.2)' }, lineStyle: { color: '#1f5fe0', width: 2 }, itemStyle: { color: '#1f5fe0' } }],
|
|
154
|
-
}],
|
|
155
|
-
});
|
|
230
|
+
el.innerHTML = DIMENSIONS.map(d => {
|
|
231
|
+
const v = scoreOf(c, d.key);
|
|
232
|
+
const color = v >= 75 ? '#52c41a' : v >= 50 ? '#faad14' : '#ff4d4f';
|
|
233
|
+
return `<div class="bar"><span class="bn">${d.name}</span><span class="bt"><i style="width:${v}%;background:${color}"></i></span><span class="bv">${v}</span></div>`;
|
|
234
|
+
}).join('');
|
|
156
235
|
});
|
|
157
236
|
|
|
158
237
|
// 对比表
|
|
@@ -160,17 +239,28 @@ function renderReport(data) {
|
|
|
160
239
|
const compareHtml = `
|
|
161
240
|
<div class="candidate-section">
|
|
162
241
|
<div class="candidate-header"><div class="candidate-name">综合对比</div></div>
|
|
163
|
-
<table class="comparison-table">
|
|
242
|
+
<div class="table-scroll"><table class="comparison-table">
|
|
164
243
|
<thead><tr><th>排名</th><th>姓名</th><th>总分</th>${DIMENSIONS.map(d => `<th>${d.name}</th>`).join('')}<th>结论</th></tr></thead>
|
|
165
244
|
<tbody>
|
|
166
|
-
${sorted.map((c, i) => `<tr><td class="rank">#${i+1}</td><td><a href="${data.baseUrl}/sp/
|
|
245
|
+
${sorted.map((c, i) => `<tr><td class="rank">#${i+1}</td><td><a href="${data.baseUrl}/sp/ebdpage/view/1343164177628012608?talentId=${c.talentId}" target="_blank" style="color:#5d9cec;text-decoration:none">${c.name}</a></td><td style="font-weight:600">${c.overall}</td>${DIMENSIONS.map(d => `<td style="text-align:center" class="${levelClass(scoreOf(c, d.key))}">${scoreOf(c, d.key)}</td>`).join('')}<td><span class="score-badge ${badgeClass(c.overall)}">${badgeText(c.overall)}</span></td></tr>`).join('')}
|
|
167
246
|
</tbody>
|
|
168
|
-
</table>
|
|
247
|
+
</table></div>
|
|
169
248
|
</div>`;
|
|
170
249
|
container.insertAdjacentHTML('beforeend', compareHtml);
|
|
171
250
|
}
|
|
172
251
|
}
|
|
173
252
|
|
|
253
|
+
const ruleBody = document.getElementById('ruleBody');
|
|
254
|
+
if (ruleBody) ruleBody.innerHTML = DIMENSIONS.map(d => `<tr><td>${d.name}</td><td>${d.desc}</td></tr>`).join('');
|
|
255
|
+
const ruleBtn = document.getElementById('ruleBtn');
|
|
256
|
+
const ruleModal = document.getElementById('ruleModal');
|
|
257
|
+
const ruleClose = document.getElementById('ruleClose');
|
|
258
|
+
if (ruleBtn && ruleModal) {
|
|
259
|
+
ruleBtn.onclick = () => { ruleModal.hidden = false; };
|
|
260
|
+
ruleClose.onclick = () => { ruleModal.hidden = true; };
|
|
261
|
+
ruleModal.onclick = (e) => { if (e.target === ruleModal) ruleModal.hidden = true; };
|
|
262
|
+
}
|
|
263
|
+
|
|
174
264
|
renderReport(REPORT_DATA);
|
|
175
265
|
</script>
|
|
176
266
|
</body>
|
|
@@ -5,7 +5,7 @@ display_name_en: Weaver CLI Shared Rules
|
|
|
5
5
|
description: weaver-work-cli 共享规则:安装检查、E10 认证、JSON 输出、高风险写入、安全边界和引用路由。
|
|
6
6
|
description_zh: weaver-work-cli 共享规则:安装检查、E10 认证、JSON 输出、高风险写入、安全边界和引用路由。
|
|
7
7
|
description_en: Shared rules for weaver-work-cli, including installation checks, E10 authentication, JSON output, high-risk writes, safety boundaries, and reference routing.
|
|
8
|
-
version: 1.2.
|
|
8
|
+
version: 1.2.7
|
|
9
9
|
author: 泛微网络科技股份有限公司
|
|
10
10
|
agent_created: true
|
|
11
11
|
requires:
|
|
@@ -37,11 +37,15 @@ requires:
|
|
|
37
37
|
|
|
38
38
|
本任务开始时一旦按下文规则判定当前智能体为 XiaoE,**不得执行 `weaver-work-cli --version` 或 `npm view weaver-work-cli version` 做可用性、版本或更新检查**。XiaoE 客户端已经负责检查并更新配套的 `weaver-work-cli`;Agent 直接进入登录态诊断或业务命令。本规则覆盖本 Skill、业务 Skill 及其 references 中所有通用的 `--version` 检查示例。
|
|
39
39
|
|
|
40
|
-
XiaoE 中如果后续命令直接返回 `command not found`、退出码 127 或明确的版本不兼容错误,停止并反馈 XiaoE 客户端运行时异常,不自行执行 npm
|
|
40
|
+
XiaoE 中如果后续命令直接返回 `command not found`、退出码 127 或明确的版本不兼容错误,停止并反馈 XiaoE 客户端运行时异常,不自行执行 npm 查询、安装或升级。CLI 自身也会跳过 XiaoE 环境的版本检查与更新。
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## CLI 版本检查与确认更新(CLI 底层负责)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
非 XiaoE 的 npm 全局安装由 CLI 统一入口负责版本检查:同一安装实例在 24 小时内最多自动检查一次,失败也进入冷却;普通调用复用本地缓存,`--help` / `--version` 不触发检查。**不要在业务调用或 Skill 安装前额外执行 `npm view`,也不要用 `--version` 做首次自检。** 源码和 `npm link` 开发环境跳过自更新。
|
|
45
|
+
|
|
46
|
+
业务结果中的 `cliUpdate`(文本命令可能通过 stderr 返回 `[weaver-work-cli:update]` 提示)包含版本、`confirmationToken` 和 `commands`。收到提示时,必须调用宿主提供的提问/确认工具,让用户选择「更新」或「稍后」;只有用户明确确认后,才执行该提示的 `commands.update`,选择稍后则执行 `commands.later`。CLI 不会自己调用宿主 ask,不得把返回提示当成用户已经确认。更新为原地安装,不保留旧版本;本次业务已经继续执行,**不要因更新提示重跑业务命令**。
|
|
47
|
+
|
|
48
|
+
需要主动排查时可运行 `weaver-work-cli update status`(仅本地缓存)或用户要求的 `weaver-work-cli update check`(立即联网检查并返回确认提示)。不要把主动检查放入每次业务前置步骤。CLI 尚未安装时,仍按安装说明取得用户确认后首次安装;已安装的 Agent Skill 副本不会随 CLI 更新自动刷新。
|
|
45
49
|
|
|
46
50
|
## 最高优先级:XiaoE 统一登录
|
|
47
51
|
|
|
@@ -126,6 +130,8 @@ CLI 和业务 Skill 在返回 `authentication` / `session_expired` 时,只能
|
|
|
126
130
|
|
|
127
131
|
⚠️ 各域 `schema` 的**默认**输出并不一致:多数域默认就是完整 manifest(体积大、超预算会压成预览),`workflow` / `hrm` / `performance` 默认已经是精简索引。所以判断能力存在与否,一律用 `--list`,不要依赖默认输出。
|
|
128
132
|
|
|
133
|
+
⚠️ `--full` **只属于 `<domain> schema`**,是 `schema` 的开关;业务 operation(`run` / `apply` / `get` 等)上没有这个选项,加在业务命令上会报 `unknown option '--full'`。它也不等于「取全量数据」——取全量数据用 `refs get`。
|
|
134
|
+
|
|
129
135
|
若某域报 `unknown option`(旧版本 CLI),退回 `weaver-work-cli <domain> schema`,并按输出首行的 `largeOutputNotice` 用 `refs get` 取全量;不要据此判断"该域不可用"。
|
|
130
136
|
|
|
131
137
|
2. 首次使用**不查版本号**,直接确认 CLI 可用:
|
|
@@ -172,6 +178,35 @@ XiaoE 环境可跳过 `doctor --e10`,直接执行业务命令(会话缺失
|
|
|
172
178
|
|
|
173
179
|
Agent 调用业务能力时优先加 `--json`。成功看进程退出码 0 和 JSON envelope 的 `ok=true`;失败看非 0 退出码和 stderr JSON 的 `error.type/subtype/message`。不要用老式 `code == 0` 判断成功。
|
|
174
180
|
|
|
181
|
+
### 退出码速查
|
|
182
|
+
|
|
183
|
+
| 退出码 | 含义 | 先做什么 |
|
|
184
|
+
| --- | --- | --- |
|
|
185
|
+
| `0` | 成功 | 再确认 `ok === true`,然后继续 |
|
|
186
|
+
| `1` | 未分类错误 | 不重试,反馈 `error.type/subtype/stage` |
|
|
187
|
+
| `2` | 参数或输入错误 | 不改参数不要重跑;先 `--help` 或 `schema --operation` 核对 |
|
|
188
|
+
| `3` | 认证错误 | 按认证规则处理,写入不得复用旧 continuation |
|
|
189
|
+
| `4` | 网络错误 | 只读最多重试 1 次;写入先只读回查 |
|
|
190
|
+
| `5` | 内部错误 | 不重试,带 operation 名反馈 |
|
|
191
|
+
| `6` | 策略或数据状态拒绝 | 不重试,按 subtype 处理(如 ref 过期就重查接口) |
|
|
192
|
+
| `10` | 需要明确确认 | 说清影响面,拿到用户明确同意后再 apply |
|
|
193
|
+
| `11` | 部分完成或不确定 | 立即停写,只做一次只读回查 |
|
|
194
|
+
| `124` / `127` | 系统层:超时被杀 / 命令不存在 | 超时不静默重跑;127 先分清「不在 PATH」与「未安装」 |
|
|
195
|
+
|
|
196
|
+
完整对照(含每种码的推荐动作)见 [`json-output-contract.md`](references/json-output-contract.md) 的「退出码」一节。
|
|
197
|
+
|
|
198
|
+
### ref 的结构与取值
|
|
199
|
+
|
|
200
|
+
结果超预算时 CLI 把完整 envelope 落盘并回 `refId`。**文件顶层是元信息 + `envelope` 包装,业务数据在 `envelope.data`**;而 `refs get <refId> <path>` 的路径**从 `envelope` 起算**,写 `data.items`,不要写 `envelope.data.items`:
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
weaver-work-cli --json refs get <refId> data.items --offset 0 --limit 20
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
PowerShell 下 `<refId>` 会被当成重定向符号,先把值放进变量再传(`$refId = "..."`)。
|
|
207
|
+
|
|
208
|
+
返回 `{ total, offset, returned, hasMore, nextOffset, data }`,用 `total` 当总数、按 `nextOffset` 续读。长文本改用 `--char-offset` / `--char-limit`。结构与报错对照见 [`json-output-contract.md`](references/json-output-contract.md) 的「ref 文件结构与读取」一节。
|
|
209
|
+
|
|
175
210
|
### 请求头契约(E10 接口调用强制)
|
|
176
211
|
|
|
177
212
|
**本段是请求头三件套的唯一权威声明**:业务 Skill 与 reference 一律引用本段,不再各自复制完整代码块;引用处只需一行紧凑指针指向本节(发布门禁 B10c 已停用,不再按技能目录逐个校验这三项参数名)。
|
|
@@ -199,7 +234,7 @@ User-Agent: AgentType=<agentType>,IsAgent=true
|
|
|
199
234
|
| 命令不可用、Agent 自动安装 CLI、安装、构建、全局 link、检查可用 skill | [`weaver-e10-installation.md`](references/weaver-e10-installation.md) |
|
|
200
235
|
| 登录、profile、E10 会话、baseUrl、auth 文件、`WEAVER_*` / `XIAOE_*` 环境变量;**首次未登录需选择认证方式,XiaoE 会话过期由 CLI 底层恢复** | [`e10-auth-and-session.md`](references/e10-auth-and-session.md) |
|
|
201
236
|
| 容器/沙箱/CI/无 GUI 环境、无人值守、登录类命令超过 180 秒未结束、出现 `Open browser login` / `Waiting for E10 authorization callback` / `Could not open browser automatically`、`auth xiaoe` 返回凭据不可用、认证目录 `EACCES` | [`non-interactive-environment.md`](references/non-interactive-environment.md) |
|
|
202
|
-
| 判断 stdout/stderr、JSON envelope
|
|
237
|
+
| 判断 stdout/stderr、JSON envelope、退出码、ref 结构与分页取值、脚本封装/跨平台调用(Windows `execFile`、PowerShell 拼参)、大结果渲染/分页控量 | [`json-output-contract.md`](references/json-output-contract.md) |
|
|
203
238
|
| 准备执行写入/删除/导入/更新、遇到 `confirmation.required`、`partial.write_uncertain`、网络中断或回查失败 | [`high-risk-write.md`](references/high-risk-write.md) |
|
|
204
239
|
|
|
205
240
|
## 安全规则
|
|
@@ -16,6 +16,14 @@ weaver-work-cli auth whoami
|
|
|
16
16
|
|
|
17
17
|
## 认证隔离与禁止探查旧目录
|
|
18
18
|
|
|
19
|
+
WorkBuddy 与 XiaoE 的会话严格按宿主归属隔离:分别只接受 `workbuddy` 和 `XiaoE` 的
|
|
20
|
+
`agentType`(兼容大小写和历史别名),同域名也不共用凭据。宿主记录缺失、损坏或归属不符时,
|
|
21
|
+
不借用全局 profile;显式 profile / auth 路径也不能绕过归属检查。业务命令及
|
|
22
|
+
`identity whoami` 读不到匹配会话时,XiaoE 自动统一登录,WorkBuddy 自动发起自己的浏览器
|
|
23
|
+
OAuth,成功后继续原操作;失败时反馈错误并停止。`auth status --no-check` 等诊断保持被动。
|
|
24
|
+
宿主环境没有可识别标记时,Agent 根据当前宿主明确上下文传 `--runtime-agent workbuddy`
|
|
25
|
+
或 `--runtime-agent xiaoe`,不要根据历史会话的 `agentType` 推断当前宿主。
|
|
26
|
+
|
|
19
27
|
`weaver-work-cli auth root` 是唯一用于确认本 CLI 认证根目录的命令;默认根目录位于用户主目录下的 `.weaver-work-cli/e10`(Windows PowerShell:`$env:USERPROFILE\.weaver-work-cli\e10`;macOS/Linux:`$HOME/.weaver-work-cli/e10`)。Agent 不得因为历史兼容信息去读取、列出、打印或解析用户主目录下的旧 `.e10-cli`,也不得探查 `e10-login` / `e10-cli` 的 auth、config 或 Keychain 数据。
|
|
20
28
|
|
|
21
29
|
登录态判断只允许通过 `weaver-work-cli auth status --no-check`、`weaver-work-cli auth profile list/current`、`weaver-work-cli doctor --e10` 和业务命令返回的 JSON 错误完成。只有用户明确提供外部 auth 文件路径时,才可按用户要求使用 `--auth <path>` 或 `E10_AUTH_PATH`;不能主动搜索旧认证目录。
|
|
@@ -24,7 +32,9 @@ weaver-work-cli auth whoami
|
|
|
24
32
|
|
|
25
33
|
业务命令依赖 E10 登录态。出现以下任一情况即判定为未登录或登录失效:
|
|
26
34
|
|
|
27
|
-
- `weaver-work-cli auth status`
|
|
35
|
+
- `weaver-work-cli auth status` 的 `loggedIn` 为 `false`(或 `status` 为 `unauthorized`):`loggedIn` 表示
|
|
36
|
+
**登录有效**,会话文件存在但已过期/被接口判定失效时同样是 `false`;判断"本地有没有会话文件"看
|
|
37
|
+
`hasSessionFile`,不要反过来用 `loggedIn`。`auth show --status` 给出同一结论
|
|
28
38
|
- `weaver-work-cli doctor --e10` 的 `e10AuthFile` 检查为 `ok: false`
|
|
29
39
|
- 业务命令失败,stderr JSON 中 `error.type === "authentication"`(如 `E10 auth not found`)
|
|
30
40
|
- 业务命令返回 `error.subtype === "session_expired"`(E10 登录态 401/302 失效)
|
|
@@ -49,17 +49,26 @@
|
|
|
49
49
|
|
|
50
50
|
## 退出码
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
52
|
+
CLI 自身只用下面 9 个退出码;`124` / `127` 不是 CLI 给的,是 shell、宿主或系统层面的结果,但排查时同样要认。
|
|
53
|
+
|
|
54
|
+
| 退出码 | 含义 | 典型来源 | 推荐处理动作 |
|
|
55
|
+
| --- | --- | --- | --- |
|
|
56
|
+
| `0` | 成功 | 任何 operation 正常结束 | 仍要同时确认 `ok === true`;成功 envelope 没有 `code/msg` |
|
|
57
|
+
| `1` | 未分类错误 `GeneralError` | 未预期异常、脚本包装层兜底 | **不重试**。把 stderr 的 `error.type/subtype/message/stage` 反馈给用户 |
|
|
58
|
+
| `2` | 参数或业务输入错误 `UsageError` | 选项拼错、缺必填、`--offset` 非整数、`ref_missing`、`ref_pick_failed`、`--limit` 与 `--char-limit` 混用 | **不重试同样命令**。先 `--help` 或 `<domain> schema --operation <name>` 确认入参,改对再跑 |
|
|
59
|
+
| `3` | 认证错误 `AuthError` | 未登录、会话失效 | 按认证规则处理(见 `e10-auth-and-session.md`);**写入不得复用旧 continuation** |
|
|
60
|
+
| `4` | 网络错误 `NetworkError` | 连不上、超时、上游 5xx | 只读操作最多重试 1 次;写入先只读回查,不重放 |
|
|
61
|
+
| `5` | 内部错误 `InternalError` | 业务 Skill 的未分类异常(`errors.ts` 的默认退出码) | **不重试**。带 `error.stage` 和 operation 名反馈 |
|
|
62
|
+
| `6` | 策略或数据状态拒绝 `PolicyError` | `ref_expired` / `ref_corrupt`、文件 JSON 输入被策略拒绝、策略禁止的操作 | **不重试**。按 subtype 处理:ref 过期就重查业务接口,被策略拒就换合规写法 |
|
|
63
|
+
| `10` | 需要明确确认 `ConfirmationRequired` | `prepare` 后等待确认、高风险写入 | 走确认流程:把影响面说清,取得用户明确同意后再 `apply` |
|
|
64
|
+
| `11` | 部分完成或结果不确定 `Partial` | `partial` / `write_uncertain` | **立即停止写流程**,只做一次只读回查,交用户判断 |
|
|
65
|
+
| `124` | (系统)进程被超时掐断 | Agent / shell / CI 的超时设置 | 视为超时失败,**不得静默重跑**;按 `SKILL.md` 的超时预算反馈 |
|
|
66
|
+
| `127` | (系统)命令不存在 | 未安装,或已安装但全局 bin 不在 `PATH` | 按 `weaver-e10-installation.md` 先区分「不在 PATH」与「未安装」,不要直接重装 |
|
|
60
67
|
|
|
61
68
|
`retryable=true` 只表示读操作或准备阶段可能可以重试;写入请求已经发出后,遇到 `partial/write_uncertain` 必须停止并交给用户判断。
|
|
62
69
|
|
|
70
|
+
判断顺序:**先看退出码定大类,再看 `error.type/subtype` 定具体动作**。同一个退出码可能对应多个 subtype(例如 `2` 既可能是参数错也可能是 `ref_missing`),只看退出码会误判。
|
|
71
|
+
|
|
63
72
|
## JSON 输入兼容
|
|
64
73
|
|
|
65
74
|
简单 JSON 优先使用 `--input-json`,两端都可用,能避开 Windows PowerShell 对 `printf`、管道、转义和续行的差异:
|
|
@@ -102,6 +111,133 @@ weaver-work-cli --json invoice run invoice.get --input-ref "$ref_id" --pick 'ite
|
|
|
102
111
|
|
|
103
112
|
Windows/PowerShell 下不要使用 `printf`、bash 反斜杠续行、`$HOME/...` 或 `~/...` 路径、`rm/ls/diff/python3` 等 Unix-only 写法;目录查看用 `Get-ChildItem`,删除用 `Remove-Item`,文件比对用 `Get-FileHash`,Python 启动器优先用 `py -3`。
|
|
104
113
|
|
|
114
|
+
## ref 文件结构与读取
|
|
115
|
+
|
|
116
|
+
结果超过 stdout 预算时,CLI 把**完整 envelope** 落盘成一个 ref 文件,stdout 只回摘要 + `refId`。**Agent 一律通过 `refs` 子命令读,不要打开文件、不要 `head`/`tail` 截取。**
|
|
117
|
+
|
|
118
|
+
### 顶层结构(最容易看错的地方)
|
|
119
|
+
|
|
120
|
+
ref 文件是「文件元信息 + 一层包装」,**不是业务数据本身**:
|
|
121
|
+
|
|
122
|
+
| 顶层字段 | 说明 |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| `schemaVersion` | ref 文件格式版本,当前为 `1` |
|
|
125
|
+
| `refId` | 引用 ID,与 stdout 里返回的一致 |
|
|
126
|
+
| `operation` | 产生它的业务 operation,可能缺省 |
|
|
127
|
+
| `createdAt` / `expiresAt` / `ttlMs` | 生命周期,默认 TTL 30 分钟 |
|
|
128
|
+
| `envelope` | **真正的数据**:与当时 stdout 上是同一个 envelope(`ok` / `operation` / `meta` / `warnings` / `error` / `data`) |
|
|
129
|
+
|
|
130
|
+
由此得出两条硬结论:
|
|
131
|
+
|
|
132
|
+
- 业务数据在 `envelope.data`,**不在顶层**。看到 `schemaVersion` / `refId` / `expiresAt` 就当「结果只有这些」是错的。
|
|
133
|
+
- `refs get <refId> <path>` 的 `path` **从 `envelope` 起算**,写成 `data.items`。不要写成 `envelope.data.items` —— `envelope` 只是文件里的字段名,不是取值路径的前缀。
|
|
134
|
+
|
|
135
|
+
同一个数组的几种合法路径写法(等价):
|
|
136
|
+
|
|
137
|
+
| 写法 | 结果 |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| `data.items` | 推荐。显式从 envelope 的 `data` 下钻 |
|
|
140
|
+
| `items` | 首段在 envelope 根上不存在时自动下钻 `data`,等价 |
|
|
141
|
+
| `$.data.items` | 支持 `$` 前缀 |
|
|
142
|
+
| `data.items[0].fid` | 支持下标,取单值 |
|
|
143
|
+
| `envelope.data.items` | **错误**,会报 `ref_pick_failed` |
|
|
144
|
+
|
|
145
|
+
### 最小可跑示例
|
|
146
|
+
|
|
147
|
+
先跑一条会超预算的列表查询,从 stdout 顶层拿 `refId`(超预算时 `previewTruncated: true` 同时出现):
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":50}'
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
再按 `--offset` / `--limit` 分页取数组(每批都是**完整条目**,不是截断后的预览):
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# 第 1 批
|
|
157
|
+
weaver-work-cli --json refs get <refId> data.items --offset 0 --limit 20
|
|
158
|
+
# 第 2 批:--offset 用上一批返回的 nextOffset
|
|
159
|
+
weaver-work-cli --json refs get <refId> data.items --offset 20 --limit 20
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```powershell
|
|
163
|
+
# 注意:PowerShell 里 <...> 是重定向/保留符号,不能当占位符,必须先放进变量
|
|
164
|
+
$refId = "ref_abc123" # 换成上一步 stdout 里的 refId 值
|
|
165
|
+
weaver-work-cli --json refs get $refId data.items --offset 0 --limit 20
|
|
166
|
+
weaver-work-cli --json refs get $refId data.items --offset 20 --limit 20
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
其余参数两端完全一致(`--input-json` 用单引号字面量,PowerShell 不会解析里面的 `$`)。
|
|
170
|
+
|
|
171
|
+
数组分页的返回结构:
|
|
172
|
+
|
|
173
|
+
| 字段 | 说明 |
|
|
174
|
+
| --- | --- |
|
|
175
|
+
| `total` | **数组真实总条数**,唯一可信的总数 |
|
|
176
|
+
| `offset` | 本批起始下标 |
|
|
177
|
+
| `returned` | 本批实际返回条数,不等于 `total` |
|
|
178
|
+
| `hasMore` | 是否还有后续,`false` 即读完 |
|
|
179
|
+
| `nextOffset` | 下一批的 `--offset` |
|
|
180
|
+
| `data` | 本批条目数组 |
|
|
181
|
+
| `largeOutputNotice` | 还有剩余时给出的续读命令提示,直接照抄执行 |
|
|
182
|
+
|
|
183
|
+
配套命令:
|
|
184
|
+
|
|
185
|
+
- `refs list`:列出未过期 ref(`refId` / `operation` / `bytes` / `createdAt` / `expiresAt`),找不到 `refId` 时先跑它。
|
|
186
|
+
- `refs show <refId>`:整份查看。**结果仍超预算时会直接报错**并提示改用 `refs get`,这是预期行为。
|
|
187
|
+
- `refs path`:ref 目录位置(排障用,不是给人读数据的)。
|
|
188
|
+
- `refs prune --all` / `--older-than 7d`:手动清理。
|
|
189
|
+
|
|
190
|
+
### 长文本要按字符分段
|
|
191
|
+
|
|
192
|
+
字段被截短时(`previewTruncatedFields` 给出 `{ unit:"chars", total, shown }`),用文本窗口参数取原文:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
weaver-work-cli --json refs get <refId> data.items[0].content --char-offset 0 --char-limit 2000
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
返回 `{ unit:"chars", totalChars, charOffset, returnedChars, hasMore, nextCharOffset, data }`,按 `nextCharOffset` 续读到 `hasMore:false`。
|
|
199
|
+
|
|
200
|
+
以下三条违反任意一条即报退出码 `2`:
|
|
201
|
+
|
|
202
|
+
- `--offset` / `--limit` 只能用于**数组**字段;
|
|
203
|
+
- `--char-offset` / `--char-limit` 只能用于**字符串**字段;
|
|
204
|
+
- 两组参数不能同时出现。
|
|
205
|
+
|
|
206
|
+
### 读取 ref 的报错对照
|
|
207
|
+
|
|
208
|
+
| 退出码 | subtype | 含义与动作 |
|
|
209
|
+
| --- | --- | --- |
|
|
210
|
+
| `2` | `ref_missing` | `refId` 不存在或已被清理。先 `refs list` 确认;确实没了才重查业务接口 |
|
|
211
|
+
| `2` | `ref_pick_failed` | 路径写错(最常见是把 `envelope.data.items` 当路径)。改路径重试 |
|
|
212
|
+
| `2` | `ref_pick_as_object` | `--pick-as` 只能把单值映射到字段,选出的已经是对象 |
|
|
213
|
+
| `6` | `ref_expired` | 超过 TTL。重新请求业务接口拿新 ref |
|
|
214
|
+
| `6` | `ref_corrupt` | 文件损坏或校验失败。不要手工修复,重查业务接口 |
|
|
215
|
+
|
|
216
|
+
## 跨平台调用形态(Windows 两个高频坑)
|
|
217
|
+
|
|
218
|
+
**坑一:脚本里 `execFile('weaver-work-cli', args)` 在 Windows 上直接 `ENOENT`。** 全局安装出来的是 `weaver-work-cli.cmd`,不是无扩展名的可执行文件,也不是 `.exe`。
|
|
219
|
+
|
|
220
|
+
```js
|
|
221
|
+
// ❌ Windows 上 ENOENT
|
|
222
|
+
execFile('weaver-work-cli', args);
|
|
223
|
+
|
|
224
|
+
// ✅ 交给 shell 解析 .cmd;注意含空格的参数要自己加引号
|
|
225
|
+
spawn('weaver-work-cli', args, { shell: true, windowsHide: true });
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
判断「装没装」用 `where weaver-work-cli`(Windows)/ `which weaver-work-cli`(macOS/Linux),不要靠抛错猜。
|
|
229
|
+
|
|
230
|
+
**坑二:PowerShell 里拼参数。** 以下写法都会把参数拼坏,改成固定形态:
|
|
231
|
+
|
|
232
|
+
| 不要这样写 | 改成 |
|
|
233
|
+
| --- | --- |
|
|
234
|
+
| `@params` splatting 拼 `--input-json` | 直接写字面量:`--input-json '{"page_size":10}'` |
|
|
235
|
+
| 双引号 + `\"` 转义 | 单引号包 JSON,PowerShell 不解析里面的 `$` 和引号 |
|
|
236
|
+
| 反引号续行多行 JSON | 先 `$body = @'...'@` here-string,再 `$body \| ConvertTo-Json -Compress` |
|
|
237
|
+
| `... \| ConvertFrom-Csv` 解析输出 | CLI **没有 CSV 输出**,也不支持 `--format`;只解析 `--json` 的 JSON |
|
|
238
|
+
|
|
239
|
+
另外 `printf`、bash 反斜杠续行、`$HOME/...`、`~/...`、`rm/ls/diff/python3` 在 Windows 下都不可用;目录用 `Get-ChildItem`,删除用 `Remove-Item`,文件比对用 `Get-FileHash`,Python 用 `py -3`。
|
|
240
|
+
|
|
105
241
|
## 大结果渲染与提效规则
|
|
106
242
|
|
|
107
243
|
当前 `weaver-work-cli` 输出层是轻量封装:JSON 模式对普通结果写完整 envelope,超预算结果会写入 CLI state 并返回摘要和 `refId`;文本模式写人类可读文本。CLI 不像飞书 CLI 已内置 `--format table/pretty/ndjson`、`--jq` 或通用 `--page-all`。Agent 仍需在调用和回复阶段主动控量,避免把超长接口响应原样渲染给用户。
|