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
package/dist/index.js
CHANGED
|
@@ -2,211 +2,118 @@
|
|
|
2
2
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
3
3
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
registerCommands,
|
|
9
|
-
toCommandMetadata
|
|
10
|
-
} from "./chunks/chunk-MZVQKQP5.js";
|
|
11
|
-
import "./chunks/chunk-6MMSLE6K.js";
|
|
12
|
-
import "./chunks/chunk-AJ62BGAW.js";
|
|
13
|
-
import "./chunks/chunk-2DNCKZRX.js";
|
|
14
|
-
import "./chunks/chunk-MD5CW4B6.js";
|
|
15
|
-
import "./chunks/chunk-DRJYPXKC.js";
|
|
16
|
-
import "./chunks/chunk-IZCQU5D5.js";
|
|
5
|
+
VALUE_TAKING_GLOBAL_OPTIONS,
|
|
6
|
+
firstPositionalToken
|
|
7
|
+
} from "./chunks/chunk-ZM7RN2IM.js";
|
|
17
8
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
emitUpdateNotice,
|
|
10
|
+
setUpdateNotice
|
|
11
|
+
} from "./chunks/chunk-257JXJGD.js";
|
|
12
|
+
import {
|
|
13
|
+
UpdateService
|
|
14
|
+
} from "./chunks/chunk-OJ4JPD25.js";
|
|
15
|
+
import "./chunks/chunk-7DE3VMZD.js";
|
|
16
|
+
import {
|
|
17
|
+
packageRootDir
|
|
18
|
+
} from "./chunks/chunk-2BZ7TY4M.js";
|
|
21
19
|
import "./chunks/chunk-BUSC6UAE.js";
|
|
22
20
|
|
|
23
|
-
// src/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-YN2ZP3CS.js");
|
|
37
|
-
await dispatchLazyShortcut(definition, shortcutMetadata());
|
|
38
|
-
});
|
|
21
|
+
// src/internal/update/bootstrap.ts
|
|
22
|
+
import { readFileSync } from "node:fs";
|
|
23
|
+
import { join } from "node:path";
|
|
24
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
25
|
+
function runtimeAgentFromArgv(argv) {
|
|
26
|
+
let runtimeAgent;
|
|
27
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
28
|
+
const token = argv[index];
|
|
29
|
+
if (token === "--") break;
|
|
30
|
+
if (token.startsWith("--runtime-agent=")) runtimeAgent = token.slice("--runtime-agent=".length);
|
|
31
|
+
else if (VALUE_TAKING_GLOBAL_OPTIONS.has(token)) {
|
|
32
|
+
const value = argv[++index];
|
|
33
|
+
if (token === "--runtime-agent") runtimeAgent = value;
|
|
39
34
|
}
|
|
40
|
-
}
|
|
35
|
+
}
|
|
36
|
+
return runtimeAgent;
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
|
|
46
|
-
load: async () => (await import("./chunks/invoice-JKLTTHSZ.js")).invoiceShortcut
|
|
47
|
-
}),
|
|
48
|
-
lazyShortcut({
|
|
49
|
-
name: "ehr",
|
|
50
|
-
description: "\u6CDB\u5FAEE10\u805A\u624D\u6797\uFF08\u4EBA\u4E8B/\u51FA\u52E4/\u85AA\u916C\uFF09CLI",
|
|
51
|
-
load: async () => (await import("./chunks/ehr-36KEX5SH.js")).ehrShortcut
|
|
52
|
-
}),
|
|
53
|
-
lazyShortcut({
|
|
54
|
-
name: "recruit-stage",
|
|
55
|
-
description: "\u6CDB\u5FAEE10\u62DB\u8058\u52A9\u624B\uFF08JD\u751F\u6210/\u7B80\u5386\u5EFA\u6863/AI\u9762\u8BD5\u9080\u7EA6\uFF09CLI",
|
|
56
|
-
load: async () => (await import("./chunks/recruit-stage-MIOJXP6W.js")).recruitStageShortcut
|
|
57
|
-
}),
|
|
58
|
-
lazyShortcut({
|
|
59
|
-
name: "performance",
|
|
60
|
-
description: "\u6CDB\u5FAEE10\u7EE9\u6548\u65B9\u6848\uFF08\u6587\u6863\u5BFC\u5165/\u5B9E\u4F53\u89E3\u6790/\u843D\u8349\u7A3F/\u786E\u8BA4\u53D1\u5E03\uFF09CLI",
|
|
61
|
-
load: async () => (await import("./chunks/performance-3MQ3AHDQ.js")).performanceShortcut
|
|
62
|
-
}),
|
|
63
|
-
lazyShortcut({
|
|
64
|
-
name: "cowork",
|
|
65
|
-
description: "\u6CDB\u5FAEE10\u534F\u4F5C\u533A\uFF08\u534F\u4F5C\u4E8B\u9879/\u8BA8\u8BBA/\u5BA1\u6279/\u5171\u4EAB\u6743\u9650\uFF09CLI",
|
|
66
|
-
load: async () => (await import("./chunks/cowork-2AWG4QLA.js")).coworkShortcut
|
|
67
|
-
}),
|
|
68
|
-
lazyShortcut({
|
|
69
|
-
name: "archive",
|
|
70
|
-
description: "E10 \u6587\u4E66\u5B9A\u6863\u6848\u7BA1\u7406 CLI",
|
|
71
|
-
load: async () => (await import("./chunks/archive-5P33NAUN.js")).archiveShortcut
|
|
72
|
-
}),
|
|
73
|
-
lazyShortcut({
|
|
74
|
-
name: "archive-oa",
|
|
75
|
-
description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
|
|
76
|
-
load: async () => (await import("./chunks/archive-oa-YTY5D7DG.js")).archiveOaShortcut
|
|
77
|
-
}),
|
|
78
|
-
lazyShortcut({
|
|
79
|
-
name: "calendar",
|
|
80
|
-
description: "\u6CDB\u5FAEE10\u65E5\u7A0B\u7BA1\u7406 CLI\uFF08\u521B\u5EFA/\u67E5\u8BE2/\u66F4\u65B0/\u5220\u9664/\u5B57\u5178\uFF09",
|
|
81
|
-
load: async () => (await import("./chunks/calendar-TNJXS5UC.js")).calendarShortcut
|
|
82
|
-
}),
|
|
83
|
-
lazyShortcut({
|
|
84
|
-
name: "fna",
|
|
85
|
-
description: "\u6CDB\u5FAEE10\u9F50\u4E1A\u6210\u8D39\u63A7\u4E2D\u5FC3\uFF08\u9884\u7B97/\u8D39\u7528\u4E2D\u5FC3/\u501F\u6B3E\u7BA1\u7406/\u53D1\u7968\u6838\u9500\uFF09CLI",
|
|
86
|
-
load: async () => (await import("./chunks/fna-JNHCLRDE.js")).fnaShortcut
|
|
87
|
-
}),
|
|
88
|
-
lazyShortcut({
|
|
89
|
-
name: "hrm",
|
|
90
|
-
description: "\u6CDB\u5FAEE10\u7EC4\u7EC7\u7BA1\u7406\uFF08\u5458\u5DE5/\u7EC4\u7EC7/\u5C97\u4F4D\u67E5\u8BE2\uFF09CLI",
|
|
91
|
-
load: async () => (await import("./chunks/hrm-FSGO4NSH.js")).hrmShortcut
|
|
92
|
-
}),
|
|
93
|
-
lazyShortcut({
|
|
94
|
-
name: "mail",
|
|
95
|
-
description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
|
|
96
|
-
load: async () => (await import("./chunks/mail-YNO7ZZUK.js")).mailShortcut
|
|
97
|
-
}),
|
|
98
|
-
lazyShortcut({
|
|
99
|
-
name: "meeting",
|
|
100
|
-
description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
|
|
101
|
-
load: async () => (await import("./chunks/meeting-NIDHDBCB.js")).meetingShortcut
|
|
102
|
-
}),
|
|
103
|
-
lazyShortcut({
|
|
104
|
-
name: "okr",
|
|
105
|
-
description: "\u6CDB\u5FAEE10 OKR \u76EE\u6807\u7BA1\u7406 CLI\uFF08\u76EE\u6807\u67E5\u8BE2/\u65B0\u5EFA/\u7F16\u8F91\u3001\u5173\u952E\u6210\u679C\u3001\u76EE\u6807\u5BF9\u9F50\u3001\u8BC4\u8BBA\uFF09",
|
|
106
|
-
load: async () => (await import("./chunks/okr-QC52G6AJ.js")).okrShortcut
|
|
107
|
-
}),
|
|
108
|
-
lazyShortcut({
|
|
109
|
-
name: "plan",
|
|
110
|
-
description: "\u6CDB\u5FAEE10\u8BA1\u5212\u62A5\u544A CLI\uFF08\u67E5\u8BE2/\u65B0\u5EFA/\u4FEE\u6539/\u53D1\u5E03/\u64A4\u56DE/\u63D0\u4EA4\u63D0\u9192/\u8BC4\u8BBA\uFF09",
|
|
111
|
-
load: async () => (await import("./chunks/plan-ISINIEPY.js")).planShortcut
|
|
112
|
-
}),
|
|
113
|
-
lazyShortcut({
|
|
114
|
-
name: "esb",
|
|
115
|
-
description: "\u6CDB\u5FAEE10 ESB \u4E2D\u5FC3\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41 CLI",
|
|
116
|
-
load: async () => (await import("./chunks/esb-PTYS3E67.js")).esbShortcut
|
|
117
|
-
}),
|
|
118
|
-
lazyShortcut({
|
|
119
|
-
name: "ebuilder-form",
|
|
120
|
-
description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
|
|
121
|
-
load: async () => (await import("./chunks/ebuilder-form-LAAMTD2Y.js")).ebuilderFormShortcut
|
|
122
|
-
}),
|
|
123
|
-
lazyShortcut({
|
|
124
|
-
name: "jiuchuanhui",
|
|
125
|
-
description: "\u6CDB\u5FAEE10\u4E5D\u6C1A\u6C47\u8425\u9500\u7BA1\u7406 CLI\uFF08\u5BA2\u6237/\u8054\u7CFB\u4EBA/\u5546\u673A/\u7EBF\u7D22/\u8054\u7CFB\u8BA1\u5212/\u516C\u6D77\uFF09",
|
|
126
|
-
load: async () => (await import("./chunks/jiuchuanhui-PTABJE7V.js")).jiuchuanhuiShortcut
|
|
127
|
-
}),
|
|
128
|
-
lazyShortcut({
|
|
129
|
-
name: "asset",
|
|
130
|
-
description: "E10 \u8D44\u4EA7\u7BA1\u7406\uFF08\u8D44\u7BA1\u5BB6\uFF09CLI",
|
|
131
|
-
load: async () => (await import("./chunks/asset-3Q5MFQBX.js")).assetShortcut
|
|
132
|
-
}),
|
|
133
|
-
lazyShortcut({
|
|
134
|
-
name: "asset-idle",
|
|
135
|
-
description: "E10 \u95F2\u7F6E\u8D44\u4EA7\u5224\u5B9A\u7ED3\u679C\u67E5\u8BE2 CLI\uFF08\u5206\u9875\u83B7\u53D6/\u805A\u5408\u7EDF\u8BA1\uFF09",
|
|
136
|
-
load: async () => (await import("./chunks/asset-idle-PQPNYIS7.js")).assetIdleShortcut
|
|
137
|
-
}),
|
|
138
|
-
lazyShortcut({
|
|
139
|
-
name: "im",
|
|
140
|
-
description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
|
|
141
|
-
load: async () => (await import("./chunks/im-2BFGS2XO.js")).imShortcut
|
|
142
|
-
}),
|
|
143
|
-
lazyShortcut({
|
|
144
|
-
name: "project",
|
|
145
|
-
description: "\u6CDB\u5FAEE10\u4E8B\u4E95\u7136\u9879\u76EE\u7BA1\u7406 CLI\uFF08\u9879\u76EE/\u4EFB\u52A1\u67E5\u8BE2\u4E0E\u786E\u8BA4\u5199\u5165\uFF09",
|
|
146
|
-
load: async () => (await import("./chunks/project-IJ6DVKT7.js")).projectShortcut
|
|
147
|
-
}),
|
|
148
|
-
lazyShortcut({
|
|
149
|
-
name: "workflow",
|
|
150
|
-
description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
|
|
151
|
-
load: async () => (await import("./chunks/workflow-RINBAL2M.js")).workflowShortcut
|
|
152
|
-
}),
|
|
153
|
-
lazyShortcut({
|
|
154
|
-
name: "blog",
|
|
155
|
-
description: "\u6CDB\u5FAEE10\u5DE5\u4F5C\u65E5\u62A5 CLI\uFF08\u67E5\u8BE2/\u53D1\u5E03/\u7F16\u8F91/\u8BC4\u8BBA/\u70B9\u8D5E/\u63D0\u9192/\u5BFC\u51FA\uFF09",
|
|
156
|
-
load: async () => (await import("./chunks/blog-MFHHK6ZR.js")).blogShortcut
|
|
157
|
-
}),
|
|
158
|
-
lazyShortcut({
|
|
159
|
-
name: "caizhilian",
|
|
160
|
-
description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
|
|
161
|
-
load: async () => (await import("./chunks/caizhilian-OZ435AYW.js")).caizhilianShortcut
|
|
162
|
-
}),
|
|
163
|
-
lazyShortcut({
|
|
164
|
-
name: "contract",
|
|
165
|
-
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
166
|
-
load: async () => (await import("./chunks/contract-C3BGUMBM.js")).contractShortcut
|
|
167
|
-
}),
|
|
168
|
-
lazyShortcut({
|
|
169
|
-
name: "reception",
|
|
170
|
-
description: "\u6CDB\u5FAE\u5BA2\u6237\u53C2\u89C2\u63A5\u5F85\u6D41\u7A0B CLI\uFF08\u9762\u677F/\u884C\u7A0B\u5355\u4E0E\u5185\u90E8\u65B9\u6848/\u586B\u5355\u9875\u9884\u586B\uFF09",
|
|
171
|
-
load: async () => (await import("./chunks/reception-3H5LUG2I.js")).receptionShortcut
|
|
172
|
-
}),
|
|
173
|
-
lazyShortcut({
|
|
174
|
-
name: "smart-extract",
|
|
175
|
-
description: "\u6CDB\u5FAEE10\u667A\u80FD\u62BD\u53D6 CLI\uFF08\u8868\u5355\u7ED3\u6784 / \u9644\u4EF6\u6B63\u6587 / \u6821\u9A8C\u5E76\u843D\u5E93\uFF0C\u8FD4\u56DE aiExtraId\uFF09",
|
|
176
|
-
load: async () => (await import("./chunks/smart-extract-N2TK3CEF.js")).smartExtractShortcut
|
|
177
|
-
}),
|
|
178
|
-
lazyShortcut({
|
|
179
|
-
name: "data",
|
|
180
|
-
description: "\u6CDB\u5FAEE10\u6570\u636E\u52A9\u624B CLI\uFF08\u6570\u636E\u6E90\u67E5\u8BE2 / \u914D\u7F6E\u4E2D\u5FC3 / \u573A\u666F\u5B9A\u4F4D\uFF09",
|
|
181
|
-
load: async () => (await import("./chunks/data-BSFYMXVO.js")).dataShortcut
|
|
182
|
-
})
|
|
183
|
-
];
|
|
184
|
-
function shortcutMetadata() {
|
|
185
|
-
return builtinShortcuts;
|
|
38
|
+
function startupCommand(argv) {
|
|
39
|
+
const normalized = argv.filter((token, index) => !(index > 0 && argv[index - 1] === "--is-connector" && ["true", "false", "1", "0", "yes", "no"].includes(token.toLowerCase())));
|
|
40
|
+
return firstPositionalToken(normalized);
|
|
186
41
|
}
|
|
187
|
-
async function
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
42
|
+
async function bootstrap(argv = process.argv.slice(2)) {
|
|
43
|
+
const root = packageRootDir();
|
|
44
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
45
|
+
const updater = new UpdateService({
|
|
46
|
+
packageRoot: root,
|
|
47
|
+
currentVersion: pkg.version,
|
|
48
|
+
env: process.env,
|
|
49
|
+
runtimeAgent: runtimeAgentFromArgv(argv)
|
|
50
|
+
});
|
|
51
|
+
const command = startupCommand(argv);
|
|
52
|
+
const informational = !command || argv.some((arg) => ["--help", "-h", "--version", "-V"].includes(arg));
|
|
53
|
+
let release;
|
|
54
|
+
if (updater.isNpmInstallation) {
|
|
55
|
+
try {
|
|
56
|
+
const deadline = Date.now() + 2e3;
|
|
57
|
+
while (!(release = updater.store.enter())) {
|
|
58
|
+
if (Date.now() >= deadline) {
|
|
59
|
+
process.stderr.write(JSON.stringify({
|
|
60
|
+
ok: false,
|
|
61
|
+
error: {
|
|
62
|
+
type: "cli",
|
|
63
|
+
subtype: "update_in_progress",
|
|
64
|
+
retryable: true,
|
|
65
|
+
message: "CLI \u6B63\u5728\u66F4\u65B0\uFF0C\u8BF7\u7A0D\u540E\u91CD\u65B0\u6267\u884C\u547D\u4EE4\u3002"
|
|
66
|
+
}
|
|
67
|
+
}) + "\n");
|
|
68
|
+
process.exitCode = 1;
|
|
69
|
+
return { handled: true };
|
|
70
|
+
}
|
|
71
|
+
await delay(25);
|
|
72
|
+
}
|
|
73
|
+
process.once("exit", release);
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const cleanup = () => {
|
|
78
|
+
if (release) {
|
|
79
|
+
process.removeListener("exit", release);
|
|
80
|
+
release();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
if (command === "update") {
|
|
84
|
+
try {
|
|
85
|
+
const [{ createProgram }, { registerCommands }, { updateCommand }] = await Promise.all([
|
|
86
|
+
import("./chunks/root-YZG2TS5W.js"),
|
|
87
|
+
import("./chunks/register-SQOPIR2G.js"),
|
|
88
|
+
import("./chunks/update-AV5VOXGY.js")
|
|
89
|
+
]);
|
|
90
|
+
const { program, ctx } = createProgram();
|
|
91
|
+
await registerCommands(program, ctx, [updateCommand]);
|
|
92
|
+
await program.parseAsync();
|
|
93
|
+
return { handled: true };
|
|
94
|
+
} finally {
|
|
95
|
+
cleanup();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (!informational && !updater.skipReason) {
|
|
99
|
+
try {
|
|
100
|
+
await updater.check();
|
|
101
|
+
if (!argv.includes("--quiet")) {
|
|
102
|
+
setUpdateNotice(updater.notice());
|
|
103
|
+
process.once("exit", emitUpdateNotice);
|
|
104
|
+
}
|
|
105
|
+
} catch {
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { handled: false, release: cleanup };
|
|
194
109
|
}
|
|
195
110
|
|
|
196
111
|
// src/index.ts
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
112
|
+
var startup = await bootstrap();
|
|
113
|
+
if (!startup.handled) {
|
|
114
|
+
try {
|
|
115
|
+
await import("./chunks/cli-FULPXIKJ.js");
|
|
116
|
+
} finally {
|
|
117
|
+
startup.release?.();
|
|
118
|
+
}
|
|
204
119
|
}
|
|
205
|
-
var { program, ctx } = createProgram();
|
|
206
|
-
await registerCommands(program, ctx, [
|
|
207
|
-
...builtinCommands,
|
|
208
|
-
...await selectShortcuts(firstPositionalToken(process.argv.slice(2)))
|
|
209
|
-
]);
|
|
210
|
-
ctx.commands = toCommandMetadata([...builtinCommands, ...shortcutMetadata()]);
|
|
211
|
-
ctx.modules = ctx.commands;
|
|
212
|
-
await program.parseAsync();
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* 关键约束:**不能用 `resolveAgentType()` 的返回值当 key**。它的 fallback 是
|
|
9
9
|
* `weaver-work-cli`,会让「终端手工执行」也写出一条宿主记录,污染分区。
|
|
10
10
|
*/
|
|
11
|
+
import { isXiaoERuntimeAgent } from '../../../core/runtime-agent.js';
|
|
11
12
|
function hasEnvPrefix(env, prefix) {
|
|
12
13
|
return Object.keys(env).some((key) => key === prefix || key.startsWith(`${prefix}_`));
|
|
13
14
|
}
|
|
@@ -29,6 +30,21 @@ const AGENT_HOST_PREFIXES = [
|
|
|
29
30
|
];
|
|
30
31
|
/** 无任何宿主标识时的分区,表示终端/未知宿主。 */
|
|
31
32
|
export const DEFAULT_AGENT_HOST_KEY = 'default';
|
|
33
|
+
export function resolveSessionHostKey(env, options = {}) {
|
|
34
|
+
if (isXiaoERuntimeAgent(options.runtimeAgent))
|
|
35
|
+
return 'xiaoe';
|
|
36
|
+
return resolveAgentHostKey(env, options.runtimeAgent);
|
|
37
|
+
}
|
|
38
|
+
export function isIsolatedAgentHost(hostKey) {
|
|
39
|
+
return hostKey === 'workbuddy' || hostKey === 'xiaoe';
|
|
40
|
+
}
|
|
41
|
+
export function matchesAgentHost(hostKey, agentType) {
|
|
42
|
+
if (hostKey === 'xiaoe')
|
|
43
|
+
return isXiaoERuntimeAgent(agentType);
|
|
44
|
+
if (hostKey === 'workbuddy')
|
|
45
|
+
return normalizeAgentHostKey(agentType) === 'workbuddy';
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
32
48
|
export function normalizeAgentHostKey(value) {
|
|
33
49
|
return value.trim().toLowerCase().replace(/[^a-z0-9]+/gu, '');
|
|
34
50
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, resolve } from 'node:path';
|
|
3
3
|
import { isConnectorMode } from '../../../core/connector.js';
|
|
4
|
-
import {
|
|
4
|
+
import { CliError, ExitCode } from '../../../core/errors.js';
|
|
5
|
+
import { isIsolatedAgentHost, matchesAgentHost, resolveAgentHostKey } from './agent-host-key.js';
|
|
6
|
+
import { parseAuthFile } from './crypto.js';
|
|
5
7
|
import { getE10AgentsPath, getE10ProfilesRoot } from './paths.js';
|
|
6
8
|
const AGENTS_FILE_VERSION = 1;
|
|
7
9
|
/** 拿锁的最长等待,超时后退化为无锁写:宁可偶尔丢记录,也不能让登录卡死。 */
|
|
@@ -84,7 +86,8 @@ function readProfileConfigAt(profile) {
|
|
|
84
86
|
/**
|
|
85
87
|
* 查找当前宿主记住的 profile,并给出可用性判定。
|
|
86
88
|
*
|
|
87
|
-
* 返回 `null`
|
|
89
|
+
* 返回 `null` 表示**没有该宿主的记录**。WorkBuddy / XiaoE 按未登录处理;
|
|
90
|
+
* 其他宿主可保留全局 profile 的兼容行为。
|
|
88
91
|
* 返回非 `ok` 的记录表示「该宿主曾经登录过,但现在不能直接用」:此时调用方必须
|
|
89
92
|
* 视为未登录,**不能**借用其他宿主的 profile,否则就是跨租户串用凭据。
|
|
90
93
|
*/
|
|
@@ -113,20 +116,53 @@ export function lookupAgentHost(env = process.env, explicitAgentType = '') {
|
|
|
113
116
|
/**
|
|
114
117
|
* 决定本次登录写哪个 profile。
|
|
115
118
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* 两个宿主登同一个域名时**不加后缀**:同租户共用一份凭据是合理的,也不该制造两份登录态。
|
|
119
|
+
* WorkBuddy / XiaoE 的新 profile 固定带宿主后缀;已有且归属正确的旧记录可以沿用。
|
|
120
|
+
* 显式 profile 必须检查归属,不能借登录覆盖另一宿主的会话。
|
|
121
|
+
* 其他宿主保留按域名派生及不同域名冲突时加后缀的兼容行为。
|
|
121
122
|
*/
|
|
122
123
|
export function resolveLoginProfileName(input) {
|
|
123
124
|
const hinted = (input.profileHint || '').trim();
|
|
124
|
-
if (hinted)
|
|
125
|
-
return hinted;
|
|
126
125
|
const derived = (input.derivedName || '').trim() || 'default';
|
|
127
126
|
const hostKey = (input.hostKey || '').trim() || resolveAgentHostKey(input.env || process.env);
|
|
128
127
|
const origin = normalizeOrigin(input.baseUrl);
|
|
129
128
|
const hosts = readAgentHosts()?.hosts || {};
|
|
129
|
+
const ownedByAnotherHost = (profile) => {
|
|
130
|
+
if (Object.entries(hosts).some(([key, record]) => key !== hostKey && record.profile === profile
|
|
131
|
+
&& (isIsolatedAgentHost(key) || isIsolatedAgentHost(hostKey))))
|
|
132
|
+
return true;
|
|
133
|
+
try {
|
|
134
|
+
const data = parseAuthFile(readFileSync(resolve(getE10ProfilesRoot(), profile, 'auth'), 'utf-8'));
|
|
135
|
+
const agentType = data?.agentType || data?.agent_type || '';
|
|
136
|
+
return Boolean(data) && (!matchesAgentHost(hostKey, agentType)
|
|
137
|
+
|| (isIsolatedAgentHost(resolveAgentHostKey({}, agentType)) && resolveAgentHostKey({}, agentType) !== hostKey));
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
if (hinted) {
|
|
144
|
+
if (ownedByAnotherHost(hinted)) {
|
|
145
|
+
throw new CliError(`E10 profile "${hinted}" belongs to another agent host. Select a separate profile for ${hostKey}.`, ExitCode.AuthError);
|
|
146
|
+
}
|
|
147
|
+
return hinted;
|
|
148
|
+
}
|
|
149
|
+
// 新的隔离宿主从首次登录就使用独立名称,避免两个宿主同时首次登录时撞写。
|
|
150
|
+
// 已有、归属正确的旧记录仍可沿用,避免升级后强制用户重新授权。
|
|
151
|
+
if (isIsolatedAgentHost(hostKey)
|
|
152
|
+
&& !(hosts[hostKey]?.profile === derived && !ownedByAnotherHost(derived))) {
|
|
153
|
+
const isolated = `${derived}-${hostKey}`;
|
|
154
|
+
if (ownedByAnotherHost(isolated)) {
|
|
155
|
+
throw new CliError(`E10 profile "${isolated}" belongs to another agent host. Select a separate profile for ${hostKey}.`, ExitCode.AuthError);
|
|
156
|
+
}
|
|
157
|
+
return isolated;
|
|
158
|
+
}
|
|
159
|
+
if (ownedByAnotherHost(derived)) {
|
|
160
|
+
const isolated = `${derived}-${hostKey}`;
|
|
161
|
+
if (ownedByAnotherHost(isolated)) {
|
|
162
|
+
throw new CliError(`E10 profile "${isolated}" belongs to another agent host. Select a separate profile for ${hostKey}.`, ExitCode.AuthError);
|
|
163
|
+
}
|
|
164
|
+
return isolated;
|
|
165
|
+
}
|
|
130
166
|
const claimedByOthers = Object.entries(hosts)
|
|
131
167
|
.filter(([key, record]) => key !== hostKey && record.profile === derived);
|
|
132
168
|
if (!claimedByOthers.length)
|
|
@@ -7,7 +7,7 @@ import { CliError, ExitCode } from '../../../core/errors.js';
|
|
|
7
7
|
import { clearInvoiceTokenForSession } from '../../../shortcuts/invoice/host.js';
|
|
8
8
|
import { buildE10CookieHeader, E10AuthSession, clearProfileAuthFile, extractRawSetCookie, extractSessionTicket, findAuthFile, getActiveProfile, getProfileAuthPath, getProfileDir, listProfiles, profileNameFromUrl, readProfileConfig, readTeamsCheckUserInfo, resolveActiveProfileForHost, saveAuthFile, saveProfileConfig, setActiveProfile, switchActiveProfile, } from './session.js';
|
|
9
9
|
import { lookupAgentHost, resolveLoginProfileName, upsertAgentHost } from './agent-hosts.js';
|
|
10
|
-
import { resolveAgentHostKey } from './agent-host-key.js';
|
|
10
|
+
import { isIsolatedAgentHost, resolveAgentHostKey, resolveSessionHostKey } from './agent-host-key.js';
|
|
11
11
|
import { getE10AuthRoot } from './paths.js';
|
|
12
12
|
import { appendXiaoEAuthErrorLog, clearXiaoEAuthErrorLog, getXiaoEAuthErrorLogPath, normalizeXiaoEAuthErrorLogLimit, readXiaoEAuthErrorLog, xiaoEAuthLogSecrets, } from './error-log.js';
|
|
13
13
|
import { XIAOE_AGENT_TYPE, createXiaoEUnifiedLoginUnavailableError, hasXiaoEEnv, inspectXiaoEUnifiedLoginSources, resolveDefaultE10BaseUrl, resolveXiaoEPreferredBaseUrl, tryXiaoEUnifiedLogin as tryXiaoEUnifiedSessionLogin, } from './xiaoe.js';
|
|
@@ -100,7 +100,7 @@ export function resolveAgentType(options = {}, env = process.env) {
|
|
|
100
100
|
|| DEFAULT_AGENT_TYPE;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* 登录目标优先按宿主记忆解析;WorkBuddy / XiaoE 不借用全局指针。
|
|
104
104
|
*
|
|
105
105
|
* 优先级的完整定义见 `docs/e10-auth.md`;这里只负责「读哪个 profile 的 config」,
|
|
106
106
|
* 真正拼 baseUrl 时调用方仍把显式 `--base-url` 放在最前面。
|
|
@@ -121,6 +121,8 @@ function resolveLoginTarget(input) {
|
|
|
121
121
|
return { hostKey, profile: host.profile, cfg };
|
|
122
122
|
}
|
|
123
123
|
const active = getActiveProfile();
|
|
124
|
+
if (isIsolatedAgentHost(hostKey))
|
|
125
|
+
return { hostKey, profile: hostKey, cfg: {} };
|
|
124
126
|
return { hostKey, profile: active, cfg: readProfileConfig(active) };
|
|
125
127
|
}
|
|
126
128
|
function normalizeAgentKey(value) {
|
|
@@ -221,9 +223,27 @@ function cookieValue(rawCookie, name) {
|
|
|
221
223
|
const match = rawCookie.match(new RegExp(`${name}=([^;]+)`));
|
|
222
224
|
return match?.[1] || '';
|
|
223
225
|
}
|
|
226
|
+
async function resolveAuthState(session, probe) {
|
|
227
|
+
if (!session) {
|
|
228
|
+
return { hasSessionFile: false, expired: false, reachable: undefined, authorized: false };
|
|
229
|
+
}
|
|
230
|
+
const expired = session.isExpired();
|
|
231
|
+
// 过期后不再发探活请求:结论已经确定,省一次必然 401 的往返。
|
|
232
|
+
const reachable = expired ? false : probe ? await session.probeValid() : undefined;
|
|
233
|
+
// 网络异常保持乐观:只有明确失效(401/403)或已过期才算未授权,避免逼用户重复登录。
|
|
234
|
+
return { hasSessionFile: true, expired, reachable, authorized: reachable !== false };
|
|
235
|
+
}
|
|
224
236
|
function formatAuthStatus(status) {
|
|
225
237
|
if (!status.loggedIn) {
|
|
226
|
-
|
|
238
|
+
const lines = ['Not logged in. Select the appropriate authentication method for the current runtime before retrying.'];
|
|
239
|
+
if (status.hasSessionFile) {
|
|
240
|
+
lines.push('session file exists but is not usable:');
|
|
241
|
+
lines.push('authFile: ' + status.authFile);
|
|
242
|
+
lines.push('expired: ' + String(status.expired));
|
|
243
|
+
if ('reachable' in status)
|
|
244
|
+
lines.push('reachable: ' + String(status.reachable));
|
|
245
|
+
}
|
|
246
|
+
return lines.join('\n');
|
|
227
247
|
}
|
|
228
248
|
const lines = [
|
|
229
249
|
'Logged in.',
|
|
@@ -245,8 +265,8 @@ function formatAuthStatus(status) {
|
|
|
245
265
|
...('credentialSourceLabel' in status && status.credentialSourceLabel ? ['credentialSourceLabel: ' + status.credentialSourceLabel] : []),
|
|
246
266
|
...('expiryTimes' in status && status.expiryTimes ? ['expiryTimes: ' + status.expiryTimes] : []),
|
|
247
267
|
];
|
|
248
|
-
if ('
|
|
249
|
-
lines.push('
|
|
268
|
+
if ('reachable' in status) {
|
|
269
|
+
lines.push('reachable: ' + String(status.reachable));
|
|
250
270
|
}
|
|
251
271
|
return lines.join('\n');
|
|
252
272
|
}
|
|
@@ -714,8 +734,8 @@ async function runXiaoELogin(ctx, options) {
|
|
|
714
734
|
const commandOpts = asOptions(options);
|
|
715
735
|
const globalOptions = ctx.getGlobalOptions();
|
|
716
736
|
const profileFromGlobal = globalOptions.profile;
|
|
717
|
-
const hostKey =
|
|
718
|
-
const cfg = readProfileConfig(profileFromGlobal || resolveActiveProfileForHost(ctx.env));
|
|
737
|
+
const hostKey = 'xiaoe';
|
|
738
|
+
const cfg = readProfileConfig(profileFromGlobal || resolveActiveProfileForHost(ctx.env, { runtimeAgent: 'xiaoe' }));
|
|
719
739
|
const explicitBaseUrl = optionString(commandOpts, 'baseUrl') || globalOptions.baseUrl || '';
|
|
720
740
|
const preferredXiaoEBaseUrl = resolveXiaoEPreferredBaseUrl({
|
|
721
741
|
explicitBaseUrl,
|
|
@@ -782,7 +802,7 @@ async function runXiaoELogin(ctx, options) {
|
|
|
782
802
|
}).catch((logError) => ctx.logger.debug(`Could not persist XiaoE auth error log: ${logError instanceof Error ? logError.message : String(logError)}`));
|
|
783
803
|
throw error;
|
|
784
804
|
}
|
|
785
|
-
async function runBrowserLogin(ctx, options, loginMode = {}) {
|
|
805
|
+
export async function runBrowserLogin(ctx, options, loginMode = {}) {
|
|
786
806
|
const commandOpts = asOptions(options);
|
|
787
807
|
const globalOptions = ctx.getGlobalOptions();
|
|
788
808
|
const profileFromGlobal = globalOptions.profile;
|
|
@@ -1216,16 +1236,19 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1216
1236
|
.action(action(async (ctx, options) => {
|
|
1217
1237
|
const opts = ctx.getGlobalOptions();
|
|
1218
1238
|
const commandOpts = asOptions(options);
|
|
1219
|
-
const authFile = findAuthFile(ctx.cwd, opts);
|
|
1239
|
+
const authFile = findAuthFile(ctx.cwd, opts, ctx.env);
|
|
1220
1240
|
const session = authFile ? E10AuthSession.fromFile(authFile, opts.baseUrl, opts.passportUrl) : null;
|
|
1221
|
-
const profile = opts.profile || resolveActiveProfileForHost(ctx.env);
|
|
1222
|
-
const agentHost =
|
|
1223
|
-
const
|
|
1224
|
-
? session.isExpired() ? false : await session.checkValid()
|
|
1225
|
-
: undefined;
|
|
1241
|
+
const profile = opts.profile || resolveActiveProfileForHost(ctx.env, opts);
|
|
1242
|
+
const agentHost = resolveSessionHostKey(ctx.env, opts);
|
|
1243
|
+
const state = await resolveAuthState(session, commandOpts.check !== false);
|
|
1226
1244
|
const status = session
|
|
1227
1245
|
? {
|
|
1228
|
-
|
|
1246
|
+
status: state.authorized ? 'authorized' : 'unauthorized',
|
|
1247
|
+
// 名字必须配得上语义:`loggedIn` 只表示"登录有效",不表示"有会话文件"。
|
|
1248
|
+
loggedIn: state.authorized,
|
|
1249
|
+
hasSessionFile: true,
|
|
1250
|
+
expired: state.expired,
|
|
1251
|
+
reachable: state.reachable,
|
|
1229
1252
|
userId: session.userId,
|
|
1230
1253
|
tenantKey: session.tenantKey,
|
|
1231
1254
|
tenantName: session.tenantName,
|
|
@@ -1245,10 +1268,12 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1245
1268
|
...(session.credentialSourceType ? { credentialSourceType: session.credentialSourceType } : {}),
|
|
1246
1269
|
...(session.credentialSourceLabel ? { credentialSourceLabel: session.credentialSourceLabel } : {}),
|
|
1247
1270
|
...(session.expiryTimes ? { expiryTimes: session.expiryTimes } : {}),
|
|
1248
|
-
valid,
|
|
1249
1271
|
}
|
|
1250
1272
|
: {
|
|
1273
|
+
status: 'unauthorized',
|
|
1251
1274
|
loggedIn: false,
|
|
1275
|
+
hasSessionFile: false,
|
|
1276
|
+
expired: false,
|
|
1252
1277
|
profile,
|
|
1253
1278
|
agentHost,
|
|
1254
1279
|
authFile,
|
|
@@ -1262,24 +1287,20 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1262
1287
|
.action(action(async (ctx, options) => {
|
|
1263
1288
|
const opts = ctx.getGlobalOptions();
|
|
1264
1289
|
const commandOpts = asOptions(options);
|
|
1265
|
-
const authFile = findAuthFile(ctx.cwd, opts);
|
|
1290
|
+
const authFile = findAuthFile(ctx.cwd, opts, ctx.env);
|
|
1266
1291
|
const session = authFile ? E10AuthSession.fromFile(authFile, opts.baseUrl, opts.passportUrl) : null;
|
|
1267
|
-
const profile = opts.profile || resolveActiveProfileForHost(ctx.env);
|
|
1268
|
-
const
|
|
1269
|
-
// 三态探活:只有明确失效(401/403)才算未授权,网络异常保持乐观,避免逼用户重复登录。
|
|
1270
|
-
const probe = session && !expired && commandOpts.check !== false
|
|
1271
|
-
? await session.probeValid()
|
|
1272
|
-
: undefined;
|
|
1273
|
-
const authorized = Boolean(session) && !expired && probe !== false;
|
|
1292
|
+
const profile = opts.profile || resolveActiveProfileForHost(ctx.env, opts);
|
|
1293
|
+
const state = await resolveAuthState(session, commandOpts.check !== false);
|
|
1274
1294
|
if (commandOpts.status === true) {
|
|
1275
|
-
ctx.output.raw(JSON.stringify({ status: authorized ? 'authorized' : 'unauthorized' }));
|
|
1295
|
+
ctx.output.raw(JSON.stringify({ status: state.authorized ? 'authorized' : 'unauthorized' }));
|
|
1276
1296
|
return;
|
|
1277
1297
|
}
|
|
1278
1298
|
ctx.output.write({
|
|
1279
|
-
status: authorized ? 'authorized' : 'unauthorized',
|
|
1280
|
-
loggedIn:
|
|
1281
|
-
|
|
1282
|
-
|
|
1299
|
+
status: state.authorized ? 'authorized' : 'unauthorized',
|
|
1300
|
+
loggedIn: state.authorized,
|
|
1301
|
+
hasSessionFile: state.hasSessionFile,
|
|
1302
|
+
expired: state.expired,
|
|
1303
|
+
reachable: state.reachable,
|
|
1283
1304
|
profile,
|
|
1284
1305
|
baseUrl: session ? session.getBaseUrl() : '',
|
|
1285
1306
|
}, { json: true });
|
|
@@ -1332,8 +1353,12 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1332
1353
|
.action(action(async (ctx) => {
|
|
1333
1354
|
const opts = ctx.getGlobalOptions();
|
|
1334
1355
|
// 当前宿主有记录时清它自己的 profile,避免在 WorkBuddy 里把智能小 E 的登录清掉。
|
|
1335
|
-
const profile = opts.profile || resolveActiveProfileForHost(ctx.env);
|
|
1336
|
-
const authFile =
|
|
1356
|
+
const profile = opts.profile || resolveActiveProfileForHost(ctx.env, opts);
|
|
1357
|
+
const authFile = findAuthFile(ctx.cwd, { ...opts, auth: undefined, profile }, ctx.env);
|
|
1358
|
+
if (!authFile) {
|
|
1359
|
+
ctx.output.write({ profile, cleared: false }, { text: 'No E10 auth to clear.' });
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1337
1362
|
const session = E10AuthSession.fromFile(authFile, opts.baseUrl, opts.passportUrl);
|
|
1338
1363
|
if (session) {
|
|
1339
1364
|
await clearInvoiceTokenCache(profile, {
|
|
@@ -1356,11 +1381,11 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1356
1381
|
const commandOpts = asOptions(options);
|
|
1357
1382
|
const json = commandOpts.json === true;
|
|
1358
1383
|
const live = commandOpts.live === true;
|
|
1359
|
-
const authFile = findAuthFile(ctx.cwd, opts);
|
|
1384
|
+
const authFile = findAuthFile(ctx.cwd, opts, ctx.env);
|
|
1360
1385
|
const session = authFile ? E10AuthSession.fromFile(authFile, opts.baseUrl, opts.passportUrl) : null;
|
|
1361
1386
|
if (!session || !session.eteamsId)
|
|
1362
1387
|
throw new CliError('E10 auth not found.', ExitCode.AuthError);
|
|
1363
|
-
const profile = opts.profile || resolveActiveProfileForHost(ctx.env);
|
|
1388
|
+
const profile = opts.profile || resolveActiveProfileForHost(ctx.env, opts);
|
|
1364
1389
|
const cached = sessionToCachedUser(session, profile);
|
|
1365
1390
|
if (!live) {
|
|
1366
1391
|
ctx.output.write(cached, {
|
|
@@ -1404,7 +1429,7 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1404
1429
|
.option('--shell <shell>', 'Shell syntax: auto, posix, or powershell', 'auto')
|
|
1405
1430
|
.action(action(async (ctx, options) => {
|
|
1406
1431
|
const commandOpts = asOptions(options);
|
|
1407
|
-
const session = await E10AuthSession.fromOptions(ctx.getGlobalOptions(), ctx.cwd);
|
|
1432
|
+
const session = await E10AuthSession.fromOptions(ctx.getGlobalOptions(), ctx.cwd, {}, ctx.env);
|
|
1408
1433
|
if (!session)
|
|
1409
1434
|
throw new CliError('E10 auth not found.', ExitCode.AuthError);
|
|
1410
1435
|
const value = {
|
|
@@ -1439,11 +1464,16 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1439
1464
|
.action(action((ctx, name) => {
|
|
1440
1465
|
if (typeof name !== 'string')
|
|
1441
1466
|
throw new CliError('profile name must be a string', ExitCode.UsageError);
|
|
1467
|
+
resolveLoginProfileName({
|
|
1468
|
+
derivedName: name, profileHint: name, baseUrl: '',
|
|
1469
|
+
hostKey: resolveSessionHostKey(ctx.env, ctx.getGlobalOptions()),
|
|
1470
|
+
});
|
|
1442
1471
|
switchActiveProfile(name);
|
|
1443
1472
|
// 显式切换同时更新宿主记忆:否则下一次登录会被旧记录带回原来的 profile。
|
|
1444
1473
|
const cfg = readProfileConfig(name);
|
|
1445
1474
|
const hostRecord = upsertAgentHost({
|
|
1446
1475
|
profile: name,
|
|
1476
|
+
hostKey: resolveSessionHostKey(ctx.env, ctx.getGlobalOptions()),
|
|
1447
1477
|
...(cfg.baseUrl ? { baseUrl: cfg.baseUrl } : {}),
|
|
1448
1478
|
...(cfg.tenantKey ? { tenantKey: cfg.tenantKey } : {}),
|
|
1449
1479
|
env: ctx.env,
|
|
@@ -1452,7 +1482,7 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1452
1482
|
active: name,
|
|
1453
1483
|
dir: getProfileDir(name),
|
|
1454
1484
|
authFile: getProfileAuthPath(name),
|
|
1455
|
-
agentHost:
|
|
1485
|
+
agentHost: resolveSessionHostKey(ctx.env, ctx.getGlobalOptions()),
|
|
1456
1486
|
...(hostRecord ? { agentHostProfile: hostRecord.profile } : {}),
|
|
1457
1487
|
};
|
|
1458
1488
|
ctx.output.write(result, { text: 'Active E10 profile: ' + name + '\n' + 'dir: ' + result.dir });
|
|
@@ -1460,7 +1490,7 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1460
1490
|
profile.command('current')
|
|
1461
1491
|
.description('Print active E10 profile')
|
|
1462
1492
|
.action(action((ctx) => {
|
|
1463
|
-
const active =
|
|
1493
|
+
const active = resolveActiveProfileForHost(ctx.env, ctx.getGlobalOptions());
|
|
1464
1494
|
ctx.output.write({ active, dir: getProfileDir(active) }, { text: active });
|
|
1465
1495
|
}));
|
|
1466
1496
|
return auth;
|