weaver-work-cli 0.1.70 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-VUTREF3P.js → archive-5P33NAUN.js} +22 -5
- package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-YTY5D7DG.js} +17 -5
- package/dist/chunks/{asset-45U6TY7I.js → asset-3Q5MFQBX.js} +22 -5
- package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-PQPNYIS7.js} +15 -5
- package/dist/chunks/{attachment-content-DMU7KNZ7.js → attachment-content-7CN7JB6B.js} +3 -3
- package/dist/chunks/{blog-5AML4WMG.js → blog-MFHHK6ZR.js} +25 -5
- package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-OZ435AYW.js} +22 -8
- package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-TNJXS5UC.js} +15 -5
- package/dist/chunks/{chunk-H2NRTGZR.js → chunk-2DNCKZRX.js} +3 -3
- package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
- package/dist/chunks/{chunk-HG6INLH6.js → chunk-6MMSLE6K.js} +23 -6
- package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-B4NINGP2.js} +3 -3
- package/dist/chunks/{chunk-LRKKKO5A.js → chunk-DRJYPXKC.js} +3 -4
- package/dist/chunks/{chunk-KDOJW5LH.js → chunk-EJLP63UO.js} +1 -1
- package/dist/chunks/{chunk-HAORST2G.js → chunk-FRMDHZSN.js} +11 -11
- package/dist/chunks/{chunk-GWM5TLIK.js → chunk-G7ZM2VOX.js} +34 -34
- package/dist/chunks/{chunk-LSVA7QA6.js → chunk-GB2MCJPG.js} +3 -1
- package/dist/chunks/{chunk-L2A3COWV.js → chunk-ICNUOWLL.js} +4 -4
- package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
- package/dist/chunks/{chunk-7CINV2BU.js → chunk-LU2SPJYY.js} +2 -2
- package/dist/chunks/{chunk-E7VWE2XI.js → chunk-MD5RXRI3.js} +3 -3
- package/dist/chunks/{chunk-VZUH3LKI.js → chunk-MZVQKQP5.js} +167 -157
- package/dist/chunks/{chunk-X6PMJQGO.js → chunk-OFCF23FY.js} +6 -6
- package/dist/chunks/{chunk-IVCOZCAW.js → chunk-OPTJ6IF7.js} +1 -1
- package/dist/chunks/{chunk-727VKJQK.js → chunk-OZ7CJC7W.js} +2 -2
- package/dist/chunks/{chunk-T24EBWAZ.js → chunk-P3AFNAJ6.js} +48 -21
- package/dist/chunks/{chunk-LJE7RZNC.js → chunk-Q3EXRNB4.js} +1 -1
- package/dist/chunks/{chunk-QYDSTYGG.js → chunk-SKWKCLJX.js} +3 -3
- package/dist/chunks/{chunk-DSBV4GRK.js → chunk-SSS75WXW.js} +3 -3
- package/dist/chunks/{chunk-I5XB4MZT.js → chunk-SUWR5QEG.js} +94 -65
- package/dist/chunks/{chunk-XIBMZEDB.js → chunk-VJWVB55R.js} +2 -2
- package/dist/chunks/{chunk-EHH363SP.js → chunk-VMVMEIL3.js} +4 -4
- package/dist/chunks/chunk-WM33BSIL.js +136 -0
- package/dist/chunks/{chunk-GFOFUH6O.js → chunk-X2C5CGGM.js} +52 -51
- package/dist/chunks/{chunk-4W6BSNIL.js → chunk-XLSJC6JZ.js} +6 -6
- package/dist/chunks/{chunk-U3OO3IZF.js → chunk-YN5SD4TX.js} +20 -7
- package/dist/chunks/{conflict-YW5BULJ3.js → conflict-Y4PXZ2YQ.js} +2 -2
- package/dist/chunks/{contract-3PMHUASH.js → contract-C3BGUMBM.js} +48 -5
- package/dist/chunks/{cowork-FZBTTBYX.js → cowork-2AWG4QLA.js} +37 -8
- package/dist/chunks/{create-flow-5OBS3B3V.js → create-flow-LOUOK46Z.js} +6 -6
- package/dist/chunks/{data-2YZ6A6TL.js → data-BSFYMXVO.js} +99 -184
- package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-LAAMTD2Y.js} +17 -7
- package/dist/chunks/{ehr-MNPR4TE5.js → ehr-36KEX5SH.js} +62 -13
- package/dist/chunks/{entry-mode-L65OWPFM.js → entry-mode-6N2IGCS4.js} +3 -3
- package/dist/chunks/{env-XW7LYIME.js → env-QYLS3EB3.js} +2 -2
- package/dist/chunks/{esb-GSB5QCEX.js → esb-PTYS3E67.js} +17 -7
- package/dist/chunks/{factory-MHFZZAGH.js → factory-LPFPKZ4T.js} +1 -1
- package/dist/chunks/{fna-XBSNUS2V.js → fna-JNHCLRDE.js} +15 -5
- package/dist/chunks/{group-chat-EEOLO5NM.js → group-chat-QP2WX4QJ.js} +3 -3
- package/dist/chunks/{host-2UMNXX5H.js → host-57LSRSE7.js} +4 -4
- package/dist/chunks/{host-NVDG3NC6.js → host-7BVR7CQ3.js} +4 -4
- package/dist/chunks/{host-SYPCA63D.js → host-C2BLBIID.js} +4 -4
- package/dist/chunks/{host-XVWBOSEN.js → host-K2ZKNXME.js} +4 -4
- package/dist/chunks/{host-R7BP3CTI.js → host-NS36QFLR.js} +6 -4
- package/dist/chunks/{host-BD44ASOD.js → host-QXFKQXNX.js} +4 -4
- package/dist/chunks/{hrm-FZUDJAND.js → hrm-FSGO4NSH.js} +15 -6
- package/dist/chunks/{im-F5NENPD7.js → im-2BFGS2XO.js} +16 -6
- package/dist/chunks/{invoice-DS6FLU55.js → invoice-JKLTTHSZ.js} +27 -6
- package/dist/chunks/{jiuchuanhui-JCBUR563.js → jiuchuanhui-PTABJE7V.js} +19 -6
- package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-YN2ZP3CS.js} +6 -6
- package/dist/chunks/{mail-ZEOSANEJ.js → mail-YNO7ZZUK.js} +116 -97
- package/dist/chunks/{meeting-PCD5EPBF.js → meeting-NIDHDBCB.js} +29 -16
- package/dist/chunks/{minute-doc-WTZJVCHG.js → minute-doc-G3QAT7DE.js} +4 -4
- package/dist/chunks/{okr-OZUMTMCL.js → okr-QC52G6AJ.js} +15 -5
- package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
- package/dist/chunks/{operations-UTUWFJTX.js → operations-MQV32ITT.js} +5 -5
- package/dist/chunks/{performance-SMVTPK6T.js → performance-3MQ3AHDQ.js} +92 -7
- package/dist/chunks/{plan-C2NENH42.js → plan-ISINIEPY.js} +15 -5
- package/dist/chunks/{project-FAJ2P3UR.js → project-IJ6DVKT7.js} +18 -5
- package/dist/chunks/{reception-NH6MJFPR.js → reception-3H5LUG2I.js} +17 -7
- package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-MIOJXP6W.js} +412 -85
- package/dist/chunks/{registry-ZQ7OONCB.js → registry-3GQRYP2R.js} +12 -12
- package/dist/chunks/{registry-3B3OAJYX.js → registry-3S7AVMXR.js} +4 -4
- package/dist/chunks/{registry-FTPUUHWC.js → registry-NHHKOEU3.js} +5 -5
- package/dist/chunks/{room-recommend-73NBN3RU.js → room-recommend-IOKBJVYP.js} +4 -4
- package/dist/chunks/{schedule-SDBOBBUQ.js → schedule-IB6EUARH.js} +4 -4
- package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-N2TK3CEF.js} +19 -6
- package/dist/chunks/{workflow-OWHWLAOX.js → workflow-RINBAL2M.js} +22 -8
- package/dist/cmd/auth/index.js +23 -0
- package/dist/cmd/e10/index.js +2 -1
- package/dist/cmd/index.js +2 -0
- package/dist/core/manifest-view.js +207 -0
- package/dist/core/output.js +38 -8
- package/dist/index.js +35 -35
- package/dist/internal/e10/auth/crypto.js +18 -8
- package/dist/internal/e10/auth/error-log.js +1 -2
- package/dist/internal/e10/auth/messages.js +2 -3
- package/dist/internal/e10/auth/xiaoe.js +1 -1
- package/dist/internal/e10/tls-policy.js +61 -13
- package/dist/shortcuts/archive/index.js +11 -2
- package/dist/shortcuts/archive/operations/download.js +1 -0
- package/dist/shortcuts/archive/operations/flow-url.js +3 -0
- package/dist/shortcuts/archive/operations/prelib.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -0
- package/dist/shortcuts/archive-oa/index.js +11 -2
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
- package/dist/shortcuts/asset/index.js +11 -2
- package/dist/shortcuts/asset/manifest.js +7 -0
- package/dist/shortcuts/asset-idle/index.js +11 -2
- package/dist/shortcuts/blog/index.js +11 -2
- package/dist/shortcuts/blog/manifest.js +10 -0
- package/dist/shortcuts/caizhilian/host.js +20 -4
- package/dist/shortcuts/caizhilian/index.js +12 -2
- package/dist/shortcuts/caizhilian/manifest.js +4 -25
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
- package/dist/shortcuts/calendar/index.js +11 -2
- package/dist/shortcuts/contract/index.js +11 -2
- package/dist/shortcuts/contract/manifest.js +32 -0
- package/dist/shortcuts/contract/operations/write.js +3 -0
- package/dist/shortcuts/cowork/index.js +21 -5
- package/dist/shortcuts/cowork/manifest.js +3 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
- package/dist/shortcuts/cowork/operations/item-write.js +3 -0
- package/dist/shortcuts/cowork/operations/member-write.js +2 -0
- package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
- package/dist/shortcuts/cowork/operations/review-write.js +1 -0
- package/dist/shortcuts/data/errors.js +16 -29
- package/dist/shortcuts/data/host.js +16 -7
- package/dist/shortcuts/data/index.js +12 -41
- package/dist/shortcuts/data/manifest.js +5 -44
- package/dist/shortcuts/data/operations/attend.js +2 -2
- package/dist/shortcuts/data/operations/conf.js +0 -88
- package/dist/shortcuts/data/operations/ds.js +4 -4
- package/dist/shortcuts/data/operations/index.js +1 -5
- package/dist/shortcuts/data/operations/module.js +40 -14
- package/dist/shortcuts/data/operations/query.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +11 -2
- package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
- package/dist/shortcuts/ehr/index.js +11 -2
- package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
- package/dist/shortcuts/esb/index.js +11 -2
- package/dist/shortcuts/esb/manifest.js +2 -0
- package/dist/shortcuts/fna/index.js +11 -2
- package/dist/shortcuts/hrm/index.js +11 -1
- package/dist/shortcuts/im/index.js +11 -2
- package/dist/shortcuts/invoice/index.js +11 -2
- package/dist/shortcuts/invoice/manifest.js +8 -0
- package/dist/shortcuts/jiuchuanhui/index.js +15 -1
- package/dist/shortcuts/jiuchuanhui/manifest.js +2 -0
- package/dist/shortcuts/mail/errors.js +14 -0
- package/dist/shortcuts/mail/index.js +23 -6
- package/dist/shortcuts/mail/manifest.js +11 -4
- package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
- package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
- package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
- package/dist/shortcuts/mail/operations/mail-read.js +7 -25
- package/dist/shortcuts/mail/operations/mail-send.js +12 -12
- package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
- package/dist/shortcuts/mail/operations/mail-template.js +10 -10
- package/dist/shortcuts/meeting/index.js +11 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
- package/dist/shortcuts/okr/index.js +11 -2
- package/dist/shortcuts/performance/index.js +62 -3
- package/dist/shortcuts/performance/scheme-validate.js +7 -0
- package/dist/shortcuts/performance/shared.js +40 -2
- package/dist/shortcuts/plan/index.js +11 -2
- package/dist/shortcuts/project/index.js +11 -2
- package/dist/shortcuts/project/operations/write.js +3 -0
- package/dist/shortcuts/reception/index.js +11 -2
- package/dist/shortcuts/reception/manifest.js +2 -2
- package/dist/shortcuts/reception/operations/ask.js +3 -0
- package/dist/shortcuts/recruit-stage/index.js +22 -3
- package/dist/shortcuts/recruit-stage/manifest.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -16
- package/dist/shortcuts/recruit-stage/operations/profile.js +186 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +76 -47
- package/dist/shortcuts/recruit-stage/operations/search.js +151 -16
- package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
- package/dist/shortcuts/recruit-stage/shared.js +11 -1
- package/dist/shortcuts/smart-extract/index.js +11 -2
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/save.js +2 -0
- package/dist/shortcuts/workflow/index.js +21 -1
- package/dist/shortcuts/workflow/operations/read.js +2 -2
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/contract.md +1 -0
- package/docs/data.md +22 -22
- package/docs/e10-auth.md +41 -33
- package/docs/ehr.md +2 -0
- package/docs/reception.md +4 -3
- package/package.json +1 -1
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/sitecustomize.py +41 -0
- package/skill-template/domains/data.md +4 -4
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
- package/skills/weaver-e10-cowork/SKILL.md +3 -1
- package/skills/weaver-e10-data/SKILL.md +12 -16
- package/skills/weaver-e10-data/references/config-center.md +6 -7
- package/skills/weaver-e10-data/references/datasource.md +1 -1
- package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -4
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +18 -8
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
- package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +4 -1
- package/skills/weaver-e10-mail/references/mail-read.md +4 -2
- package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-performance/SKILL.md +8 -6
- package/skills/weaver-e10-recruit-stage/SKILL.md +125 -20
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +359 -0
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +9 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +177 -0
- package/skills/weaver-e10-shared/SKILL.md +22 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
firstPositionalToken,
|
|
8
8
|
registerCommands,
|
|
9
9
|
toCommandMetadata
|
|
10
|
-
} from "./chunks/chunk-
|
|
11
|
-
import "./chunks/chunk-
|
|
10
|
+
} from "./chunks/chunk-MZVQKQP5.js";
|
|
11
|
+
import "./chunks/chunk-6MMSLE6K.js";
|
|
12
12
|
import "./chunks/chunk-AJ62BGAW.js";
|
|
13
|
-
import "./chunks/chunk-
|
|
13
|
+
import "./chunks/chunk-2DNCKZRX.js";
|
|
14
14
|
import "./chunks/chunk-MD5CW4B6.js";
|
|
15
|
-
import "./chunks/chunk-
|
|
16
|
-
import "./chunks/chunk-
|
|
15
|
+
import "./chunks/chunk-DRJYPXKC.js";
|
|
16
|
+
import "./chunks/chunk-IZCQU5D5.js";
|
|
17
17
|
import {
|
|
18
18
|
applyE10TlsPolicy
|
|
19
|
-
} from "./chunks/chunk-
|
|
19
|
+
} from "./chunks/chunk-SUWR5QEG.js";
|
|
20
20
|
import "./chunks/chunk-UG5G54VL.js";
|
|
21
21
|
import "./chunks/chunk-BUSC6UAE.js";
|
|
22
22
|
|
|
@@ -33,7 +33,7 @@ function lazyShortcut(definition) {
|
|
|
33
33
|
placeholder.allowExcessArguments(true);
|
|
34
34
|
placeholder.helpOption(false);
|
|
35
35
|
placeholder.action(async () => {
|
|
36
|
-
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-
|
|
36
|
+
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-YN2ZP3CS.js");
|
|
37
37
|
await dispatchLazyShortcut(definition, shortcutMetadata());
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -43,142 +43,142 @@ var builtinShortcuts = [
|
|
|
43
43
|
lazyShortcut({
|
|
44
44
|
name: "invoice",
|
|
45
45
|
description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
|
|
46
|
-
load: async () => (await import("./chunks/invoice-
|
|
46
|
+
load: async () => (await import("./chunks/invoice-JKLTTHSZ.js")).invoiceShortcut
|
|
47
47
|
}),
|
|
48
48
|
lazyShortcut({
|
|
49
49
|
name: "ehr",
|
|
50
50
|
description: "\u6CDB\u5FAEE10\u805A\u624D\u6797\uFF08\u4EBA\u4E8B/\u51FA\u52E4/\u85AA\u916C\uFF09CLI",
|
|
51
|
-
load: async () => (await import("./chunks/ehr-
|
|
51
|
+
load: async () => (await import("./chunks/ehr-36KEX5SH.js")).ehrShortcut
|
|
52
52
|
}),
|
|
53
53
|
lazyShortcut({
|
|
54
54
|
name: "recruit-stage",
|
|
55
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-
|
|
56
|
+
load: async () => (await import("./chunks/recruit-stage-MIOJXP6W.js")).recruitStageShortcut
|
|
57
57
|
}),
|
|
58
58
|
lazyShortcut({
|
|
59
59
|
name: "performance",
|
|
60
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-
|
|
61
|
+
load: async () => (await import("./chunks/performance-3MQ3AHDQ.js")).performanceShortcut
|
|
62
62
|
}),
|
|
63
63
|
lazyShortcut({
|
|
64
64
|
name: "cowork",
|
|
65
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-
|
|
66
|
+
load: async () => (await import("./chunks/cowork-2AWG4QLA.js")).coworkShortcut
|
|
67
67
|
}),
|
|
68
68
|
lazyShortcut({
|
|
69
69
|
name: "archive",
|
|
70
70
|
description: "E10 \u6587\u4E66\u5B9A\u6863\u6848\u7BA1\u7406 CLI",
|
|
71
|
-
load: async () => (await import("./chunks/archive-
|
|
71
|
+
load: async () => (await import("./chunks/archive-5P33NAUN.js")).archiveShortcut
|
|
72
72
|
}),
|
|
73
73
|
lazyShortcut({
|
|
74
74
|
name: "archive-oa",
|
|
75
75
|
description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
|
|
76
|
-
load: async () => (await import("./chunks/archive-oa-
|
|
76
|
+
load: async () => (await import("./chunks/archive-oa-YTY5D7DG.js")).archiveOaShortcut
|
|
77
77
|
}),
|
|
78
78
|
lazyShortcut({
|
|
79
79
|
name: "calendar",
|
|
80
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-
|
|
81
|
+
load: async () => (await import("./chunks/calendar-TNJXS5UC.js")).calendarShortcut
|
|
82
82
|
}),
|
|
83
83
|
lazyShortcut({
|
|
84
84
|
name: "fna",
|
|
85
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-
|
|
86
|
+
load: async () => (await import("./chunks/fna-JNHCLRDE.js")).fnaShortcut
|
|
87
87
|
}),
|
|
88
88
|
lazyShortcut({
|
|
89
89
|
name: "hrm",
|
|
90
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-
|
|
91
|
+
load: async () => (await import("./chunks/hrm-FSGO4NSH.js")).hrmShortcut
|
|
92
92
|
}),
|
|
93
93
|
lazyShortcut({
|
|
94
94
|
name: "mail",
|
|
95
95
|
description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
|
|
96
|
-
load: async () => (await import("./chunks/mail-
|
|
96
|
+
load: async () => (await import("./chunks/mail-YNO7ZZUK.js")).mailShortcut
|
|
97
97
|
}),
|
|
98
98
|
lazyShortcut({
|
|
99
99
|
name: "meeting",
|
|
100
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-
|
|
101
|
+
load: async () => (await import("./chunks/meeting-NIDHDBCB.js")).meetingShortcut
|
|
102
102
|
}),
|
|
103
103
|
lazyShortcut({
|
|
104
104
|
name: "okr",
|
|
105
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-
|
|
106
|
+
load: async () => (await import("./chunks/okr-QC52G6AJ.js")).okrShortcut
|
|
107
107
|
}),
|
|
108
108
|
lazyShortcut({
|
|
109
109
|
name: "plan",
|
|
110
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-
|
|
111
|
+
load: async () => (await import("./chunks/plan-ISINIEPY.js")).planShortcut
|
|
112
112
|
}),
|
|
113
113
|
lazyShortcut({
|
|
114
114
|
name: "esb",
|
|
115
115
|
description: "\u6CDB\u5FAEE10 ESB \u4E2D\u5FC3\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41 CLI",
|
|
116
|
-
load: async () => (await import("./chunks/esb-
|
|
116
|
+
load: async () => (await import("./chunks/esb-PTYS3E67.js")).esbShortcut
|
|
117
117
|
}),
|
|
118
118
|
lazyShortcut({
|
|
119
119
|
name: "ebuilder-form",
|
|
120
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-
|
|
121
|
+
load: async () => (await import("./chunks/ebuilder-form-LAAMTD2Y.js")).ebuilderFormShortcut
|
|
122
122
|
}),
|
|
123
123
|
lazyShortcut({
|
|
124
124
|
name: "jiuchuanhui",
|
|
125
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-
|
|
126
|
+
load: async () => (await import("./chunks/jiuchuanhui-PTABJE7V.js")).jiuchuanhuiShortcut
|
|
127
127
|
}),
|
|
128
128
|
lazyShortcut({
|
|
129
129
|
name: "asset",
|
|
130
130
|
description: "E10 \u8D44\u4EA7\u7BA1\u7406\uFF08\u8D44\u7BA1\u5BB6\uFF09CLI",
|
|
131
|
-
load: async () => (await import("./chunks/asset-
|
|
131
|
+
load: async () => (await import("./chunks/asset-3Q5MFQBX.js")).assetShortcut
|
|
132
132
|
}),
|
|
133
133
|
lazyShortcut({
|
|
134
134
|
name: "asset-idle",
|
|
135
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-
|
|
136
|
+
load: async () => (await import("./chunks/asset-idle-PQPNYIS7.js")).assetIdleShortcut
|
|
137
137
|
}),
|
|
138
138
|
lazyShortcut({
|
|
139
139
|
name: "im",
|
|
140
140
|
description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
|
|
141
|
-
load: async () => (await import("./chunks/im-
|
|
141
|
+
load: async () => (await import("./chunks/im-2BFGS2XO.js")).imShortcut
|
|
142
142
|
}),
|
|
143
143
|
lazyShortcut({
|
|
144
144
|
name: "project",
|
|
145
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-
|
|
146
|
+
load: async () => (await import("./chunks/project-IJ6DVKT7.js")).projectShortcut
|
|
147
147
|
}),
|
|
148
148
|
lazyShortcut({
|
|
149
149
|
name: "workflow",
|
|
150
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-
|
|
151
|
+
load: async () => (await import("./chunks/workflow-RINBAL2M.js")).workflowShortcut
|
|
152
152
|
}),
|
|
153
153
|
lazyShortcut({
|
|
154
154
|
name: "blog",
|
|
155
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-
|
|
156
|
+
load: async () => (await import("./chunks/blog-MFHHK6ZR.js")).blogShortcut
|
|
157
157
|
}),
|
|
158
158
|
lazyShortcut({
|
|
159
159
|
name: "caizhilian",
|
|
160
160
|
description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
|
|
161
|
-
load: async () => (await import("./chunks/caizhilian-
|
|
161
|
+
load: async () => (await import("./chunks/caizhilian-OZ435AYW.js")).caizhilianShortcut
|
|
162
162
|
}),
|
|
163
163
|
lazyShortcut({
|
|
164
164
|
name: "contract",
|
|
165
165
|
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
166
|
-
load: async () => (await import("./chunks/contract-
|
|
166
|
+
load: async () => (await import("./chunks/contract-C3BGUMBM.js")).contractShortcut
|
|
167
167
|
}),
|
|
168
168
|
lazyShortcut({
|
|
169
169
|
name: "reception",
|
|
170
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-
|
|
171
|
+
load: async () => (await import("./chunks/reception-3H5LUG2I.js")).receptionShortcut
|
|
172
172
|
}),
|
|
173
173
|
lazyShortcut({
|
|
174
174
|
name: "smart-extract",
|
|
175
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-
|
|
176
|
+
load: async () => (await import("./chunks/smart-extract-N2TK3CEF.js")).smartExtractShortcut
|
|
177
177
|
}),
|
|
178
178
|
lazyShortcut({
|
|
179
179
|
name: "data",
|
|
180
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-
|
|
181
|
+
load: async () => (await import("./chunks/data-BSFYMXVO.js")).dataShortcut
|
|
182
182
|
})
|
|
183
183
|
];
|
|
184
184
|
function shortcutMetadata() {
|
|
@@ -26,6 +26,12 @@ function getKeyFilePath() {
|
|
|
26
26
|
function loadKeyringEntryConstructor() {
|
|
27
27
|
if (keyringEntryConstructor !== undefined)
|
|
28
28
|
return keyringEntryConstructor;
|
|
29
|
+
// 显式关闭:CI、容器、以及不希望被 macOS 授权弹窗打断的场景可以直接设
|
|
30
|
+
// WEAVER_WORK_CLI_KEYCHAIN=off,此时一律使用 `~/.weaver-work-cli/e10/.key`。
|
|
31
|
+
if (process.env.WEAVER_WORK_CLI_KEYCHAIN?.toLowerCase() === 'off') {
|
|
32
|
+
keyringEntryConstructor = null;
|
|
33
|
+
return keyringEntryConstructor;
|
|
34
|
+
}
|
|
29
35
|
try {
|
|
30
36
|
const module = require('@napi-rs/keyring');
|
|
31
37
|
keyringEntryConstructor = typeof module.Entry === 'function'
|
|
@@ -84,20 +90,24 @@ function readKeyFile(filePath) {
|
|
|
84
90
|
function getEncKey() {
|
|
85
91
|
if (encKey)
|
|
86
92
|
return encKey;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
// changes between CLI runs.
|
|
93
|
+
// 本地 fallback 密钥优先。它与钥匙串密钥互斥:下面只有钥匙串写入失败时才会落这个文件,
|
|
94
|
+
// 所以"文件存在"就等于"本机已有可用密钥",不必再去问系统要。
|
|
95
|
+
//
|
|
96
|
+
// 反过来先读钥匙串的代价很实际:没有 keychain ACL 授权的机器上,每个进程解开授权文件时
|
|
97
|
+
// 都会弹出 macOS 的"node 想要使用 you 存储在钥匙串 weaver-work-cli 中的机密信息"授权框。
|
|
98
|
+
// 用户不知道钥匙串密码时无法点"始终允许",只能一次次点"拒绝"——拒绝之后本进程才退回文件密钥,
|
|
99
|
+
// 下一个进程又弹一次。把文件密钥放到前面,这类机器上就一次都不会弹。
|
|
95
100
|
const keyFile = getKeyFilePath();
|
|
96
101
|
const fileKey = readKeyFile(keyFile);
|
|
97
102
|
if (fileKey) {
|
|
98
103
|
encKey = fileKey;
|
|
99
104
|
return encKey;
|
|
100
105
|
}
|
|
106
|
+
const storedKey = readKeychainKey(KEYCHAIN_SERVICE);
|
|
107
|
+
if (storedKey) {
|
|
108
|
+
encKey = storedKey;
|
|
109
|
+
return encKey;
|
|
110
|
+
}
|
|
101
111
|
const fresh = randomBytes(32);
|
|
102
112
|
if (writeKeychainKey(KEYCHAIN_SERVICE, fresh)) {
|
|
103
113
|
encKey = fresh;
|
|
@@ -199,10 +199,9 @@ function sanitizeError(error, secrets) {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
function sanitizeTlsPolicy(tls, secrets) {
|
|
202
|
-
const caFiles = tls.caFiles.map((file) => redactSensitiveText(file, secrets));
|
|
203
202
|
return {
|
|
204
203
|
mode: tls.mode,
|
|
205
|
-
caFiles,
|
|
204
|
+
caFiles: tls.caFiles.map((file) => redactSensitiveText(file, secrets)),
|
|
206
205
|
applied: tls.applied,
|
|
207
206
|
...(tls.notAppliedReason ? { notAppliedReason: tls.notAppliedReason } : {}),
|
|
208
207
|
...(tls.error ? { error: redactSensitiveText(tls.error, secrets) } : {}),
|
|
@@ -12,9 +12,8 @@ export const E10_XIAOE_NETWORK_UNAVAILABLE_MESSAGE = '暂时无法连接 E10,
|
|
|
12
12
|
* 所以单独给一条可操作的出口,并说明为什么 CLI 不默认关掉校验。
|
|
13
13
|
*/
|
|
14
14
|
export const E10_XIAOE_TLS_UNTRUSTED_MESSAGE = 'E10 网关证书不受信任(自签名或私有 CA 签发的证书链),自动获取登录信息已停止。'
|
|
15
|
-
+ '
|
|
15
|
+
+ 'CLI 默认校验证书:请把网关 CA 证书(PEM)交给 CLI——设置 WEAVER_E10_CA_FILE=<CA PEM 路径> 后重试;'
|
|
16
16
|
+ 'Node 低于 22.15 时该变量无法在运行时生效,请改用 NODE_EXTRA_CA_CERTS=<CA PEM 路径> 启动 CLI。'
|
|
17
17
|
+ '仅在排查「是不是证书问题」时可显式设置 WEAVER_E10_TLS_INSECURE=1 临时跳过校验'
|
|
18
|
-
+ '(会关闭本进程全部证书校验,换票请求携带的平台票据可能被截获,确认后立刻去掉)。'
|
|
19
|
-
+ 'CLI 不会默认关闭证书校验。';
|
|
18
|
+
+ '(会关闭本进程全部证书校验,换票请求携带的平台票据可能被截获,确认后立刻去掉)。';
|
|
20
19
|
export const E10_SESSION_EXPIRED_MESSAGE = `E10 登录态已失效,本次操作已停止。${E10_REAUTH_GUIDANCE}`;
|
|
@@ -1324,7 +1324,7 @@ export async function tryXiaoEUnifiedLogin(options = {}) {
|
|
|
1324
1324
|
const env = options.env || process.env;
|
|
1325
1325
|
// 必须在任何换票请求之前生效:`setDefaultCACertificates` 只影响之后创建的
|
|
1326
1326
|
// TLS 上下文,晚一步注入,本次登录仍然会撞自签名证书。
|
|
1327
|
-
const tlsPolicy = applyE10TlsPolicy(
|
|
1327
|
+
const tlsPolicy = applyE10TlsPolicy();
|
|
1328
1328
|
const explicitBaseUrl = normalizeUrl(options.baseUrl || '');
|
|
1329
1329
|
const baseUrl = resolveXiaoEPreferredBaseUrl({
|
|
1330
1330
|
explicitBaseUrl,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
3
|
+
import { delimiter, resolve } from 'node:path';
|
|
4
4
|
import * as tls from 'node:tls';
|
|
5
|
+
import { packagePath } from '../../core/package-paths.js';
|
|
5
6
|
/**
|
|
6
7
|
* E10 网关 TLS 信任策略。
|
|
7
8
|
*
|
|
@@ -20,15 +21,23 @@ export const E10_TLS_CA_FILE_ENV = 'WEAVER_E10_CA_FILE';
|
|
|
20
21
|
/** 历史命名,保留为别名,便于与 `WEAVER_XIAOE_*` 一族对齐。 */
|
|
21
22
|
export const E10_TLS_CA_FILE_ALIASES = ['WEAVER_XIAOE_CA_FILE'];
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* 校验开关。
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* **默认严格校验**:不设置 `WEAVER_E10_TLS_INSECURE` 时按系统信任链(或
|
|
27
|
+
* `WEAVER_E10_CA_FILE` 指定的 CA)验证服务端证书。
|
|
28
|
+
* - 未设置 / 空 → 严格校验;
|
|
29
|
+
* - `1` / `true` / `yes` / `on` → 跳过校验(逃生开关,仅用于排查证书问题);
|
|
30
|
+
* - `0` / `false` / `no` / `off` → 严格校验;
|
|
31
|
+
* - 值写错 → 按严格校验处理,避免手误把校验关掉。
|
|
32
|
+
*
|
|
33
|
+
* 跳过校验的实现是 `NODE_TLS_REJECT_UNAUTHORIZED=0`(Node 的 `fetch`/undici 与
|
|
34
|
+
* `https.request` 在建连时读取),只影响当前进程及其子进程,不写任何持久化配置。
|
|
29
35
|
*/
|
|
30
36
|
export const E10_TLS_INSECURE_ENV = 'WEAVER_E10_TLS_INSECURE';
|
|
37
|
+
/** 环境变量缺失(或值写错)时的取值:默认严格校验。 */
|
|
38
|
+
export const E10_TLS_INSECURE_FALLBACK = '0';
|
|
31
39
|
const INSECURE_VALUES = new Set(['1', 'true', 'yes', 'on']);
|
|
40
|
+
const SECURE_VALUES = new Set(['0', 'false', 'no', 'off']);
|
|
32
41
|
const PEM_MARKER = 'BEGIN CERTIFICATE';
|
|
33
42
|
/**
|
|
34
43
|
* 逗号分隔而不是 `path.delimiter`:Windows 的盘符冒号与 POSIX 的 `:` 分隔符
|
|
@@ -57,9 +66,29 @@ function expandHome(value) {
|
|
|
57
66
|
return resolve(homedir(), value.slice(2));
|
|
58
67
|
return value;
|
|
59
68
|
}
|
|
60
|
-
|
|
69
|
+
/**
|
|
70
|
+
* 三态读取:`on` / `off` / `default`(未设置或值写错)。
|
|
71
|
+
* 值写错按默认处理,避免手误把策略翻掉。
|
|
72
|
+
*/
|
|
73
|
+
export function readE10TlsInsecureSetting(env = process.env) {
|
|
61
74
|
const raw = env[E10_TLS_INSECURE_ENV];
|
|
62
|
-
|
|
75
|
+
if (typeof raw !== 'string' || !raw.trim())
|
|
76
|
+
return 'default';
|
|
77
|
+
const value = raw.trim().toLowerCase();
|
|
78
|
+
if (INSECURE_VALUES.has(value))
|
|
79
|
+
return 'on';
|
|
80
|
+
if (SECURE_VALUES.has(value))
|
|
81
|
+
return 'off';
|
|
82
|
+
return 'default';
|
|
83
|
+
}
|
|
84
|
+
/** 未设置(或值写错)时按 `E10_TLS_INSECURE_FALLBACK`(`0`,即严格校验)处理。 */
|
|
85
|
+
export function isE10TlsInsecureEnabled(env = process.env) {
|
|
86
|
+
const setting = readE10TlsInsecureSetting(env);
|
|
87
|
+
if (setting === 'on')
|
|
88
|
+
return true;
|
|
89
|
+
if (setting === 'off')
|
|
90
|
+
return false;
|
|
91
|
+
return INSECURE_VALUES.has(E10_TLS_INSECURE_FALLBACK.trim().toLowerCase());
|
|
63
92
|
}
|
|
64
93
|
/**
|
|
65
94
|
* 读取并校验配置的 CA 文件。刻意不抛异常:配置写错不应该让所有命令起不来,
|
|
@@ -67,7 +96,7 @@ export function isE10TlsInsecureEnabled(env = process.env) {
|
|
|
67
96
|
*/
|
|
68
97
|
export function resolveE10TlsPolicy(env = process.env) {
|
|
69
98
|
const configuredFiles = readE10TlsCaFilePaths(env);
|
|
70
|
-
//
|
|
99
|
+
// 默认严格校验:只有显式开启(或调用方自己设了 NODE_TLS_REJECT_UNAUTHORIZED=0)才算跳过。
|
|
71
100
|
const insecureSource = isE10TlsInsecureEnabled(env)
|
|
72
101
|
? 'flag'
|
|
73
102
|
: env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? 'node-env' : undefined;
|
|
@@ -133,6 +162,9 @@ function applyInsecure(policy) {
|
|
|
133
162
|
function applyUncached(policy) {
|
|
134
163
|
if (policy.mode === 'insecure')
|
|
135
164
|
return applyInsecure(policy);
|
|
165
|
+
// 严格模式:把本进程之前设过的开关撤掉,否则「显式 0」在同一进程里不生效。
|
|
166
|
+
if (process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0')
|
|
167
|
+
delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
|
|
136
168
|
if (policy.mode !== 'custom-ca' || !policy.ca.length) {
|
|
137
169
|
return { ...policy, applied: false, notAppliedReason: 'no-custom-ca' };
|
|
138
170
|
}
|
|
@@ -236,16 +268,32 @@ export function summarizeE10TlsPolicy(status) {
|
|
|
236
268
|
* Python 兼容脚本只认自己的信任链:把它能理解的两个变量补进子进程环境。
|
|
237
269
|
* 调用方显式设置过就尊重调用方(可能是平台统一的证书入口)。
|
|
238
270
|
*/
|
|
271
|
+
/** 包内自带的 Python 钩子目录(`sitecustomize.py`),不存在时返回空串。 */
|
|
272
|
+
export function e10TlsPythonSiteDir() {
|
|
273
|
+
const dir = packagePath('scripts', 'pysite');
|
|
274
|
+
return existsSync(dir) ? dir : '';
|
|
275
|
+
}
|
|
239
276
|
export function e10TlsChildEnv(env = process.env) {
|
|
240
277
|
const policy = resolveE10TlsPolicy(env);
|
|
241
278
|
if (policy.mode === 'insecure') {
|
|
242
|
-
// `NODE_TLS_REJECT_UNAUTHORIZED` 对 Python
|
|
243
|
-
|
|
279
|
+
// `NODE_TLS_REJECT_UNAUTHORIZED` 对 Python 无效:显式传开关值,并把包内 sitecustomize
|
|
280
|
+
// 挂到 PYTHONPATH,覆盖不读该变量的第三方脚本(urllib / http.client / requests)。
|
|
281
|
+
const next = { ...env, [E10_TLS_INSECURE_ENV]: '1' };
|
|
282
|
+
const siteDir = e10TlsPythonSiteDir();
|
|
283
|
+
if (siteDir) {
|
|
284
|
+
const existing = typeof next.PYTHONPATH === 'string' && next.PYTHONPATH.trim()
|
|
285
|
+
? next.PYTHONPATH
|
|
286
|
+
: '';
|
|
287
|
+
next.PYTHONPATH = existing ? `${siteDir}${delimiter}${existing}` : siteDir;
|
|
288
|
+
}
|
|
289
|
+
return next;
|
|
244
290
|
}
|
|
291
|
+
// 严格模式必须把 0 传给子进程:`sitecustomize.py` 在变量缺失时默认放行,
|
|
292
|
+
// 不显式传 0 的话 Python 侧会与 CLI 的策略相反。
|
|
293
|
+
const next = { ...env, [E10_TLS_INSECURE_ENV]: '0' };
|
|
245
294
|
if (policy.mode !== 'custom-ca' || !policy.caFiles.length)
|
|
246
|
-
return
|
|
295
|
+
return next;
|
|
247
296
|
const bundle = policy.caFiles[0];
|
|
248
|
-
const next = { ...env };
|
|
249
297
|
if (!next.SSL_CERT_FILE)
|
|
250
298
|
next.SSL_CERT_FILE = bundle;
|
|
251
299
|
if (!next.REQUESTS_CA_BUNDLE)
|
|
@@ -2,6 +2,7 @@ import { readFile, writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
4
4
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
5
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
5
6
|
import { formatSearchCard, formatSearchHtml, formatSearchText } from './render/search-format.js';
|
|
6
7
|
import { createArchiveContinuationSigner } from './continuation.js';
|
|
7
8
|
import { createArchiveHost } from './host.js';
|
|
@@ -155,8 +156,16 @@ export const archiveShortcut = {
|
|
|
155
156
|
const archive = program.command('archive').description('E10 文书定档案管理');
|
|
156
157
|
archive.command('schema')
|
|
157
158
|
.description('Print archive operation manifest for agents')
|
|
158
|
-
.
|
|
159
|
-
|
|
159
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
160
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
161
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
162
|
+
.action(action((ctx, options) => {
|
|
163
|
+
const schema = schemaOptionsOf(options);
|
|
164
|
+
ctx.output.write(manifestView(archiveManifest, schema), {
|
|
165
|
+
json: true,
|
|
166
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
167
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
168
|
+
});
|
|
160
169
|
}));
|
|
161
170
|
withJsonInputOptions(archive.command('run')
|
|
162
171
|
.description('Run an archive operation with JSON input')
|
|
@@ -117,6 +117,7 @@ const downloadPrepare = {
|
|
|
117
117
|
summary: '下载借阅单原文前的预检:校验未超期且存在可下载原文,并生成确认票据',
|
|
118
118
|
capability: 'archive',
|
|
119
119
|
risk: READ,
|
|
120
|
+
requiresConfirmation: true,
|
|
120
121
|
inputSchema: schemaOf({
|
|
121
122
|
dataId: { type: 'string', pattern: '^\\d+$', description: '借阅单主表数据 ID' },
|
|
122
123
|
exportType: { type: 'string', description: '0=直接导出(默认),1=分组导出' },
|
|
@@ -136,6 +136,7 @@ const flowBorrowCarPrepare = {
|
|
|
136
136
|
summary: '从借阅车发起借阅:检查流程绑定并生成确认票据(不写数据)',
|
|
137
137
|
capability: 'archive',
|
|
138
138
|
risk: READ,
|
|
139
|
+
requiresConfirmation: true,
|
|
139
140
|
inputSchema: schemaOf({
|
|
140
141
|
arcIds: { type: 'array', items: { type: 'string' }, description: '档案标识数组,元素为 {档案ID}_{表单ID}' },
|
|
141
142
|
carIds: { type: 'array', items: { type: 'string' }, description: '借阅车记录 ID 数组,与 arcIds 一一对应' },
|
|
@@ -230,6 +231,7 @@ const flowSearchPrepare = {
|
|
|
230
231
|
summary: '从全文检索结果直接发起借阅:检查流程绑定并生成确认票据(不写数据)',
|
|
231
232
|
capability: 'archive',
|
|
232
233
|
risk: READ,
|
|
234
|
+
requiresConfirmation: true,
|
|
233
235
|
inputSchema: schemaOf({
|
|
234
236
|
arcIds: { type: 'array', items: { type: 'string' }, description: '档案标识数组,元素为 {档案ID}_{表单ID}' },
|
|
235
237
|
reason: { type: 'string', description: '借阅原因(必填,对话中向用户确认)' },
|
|
@@ -314,6 +316,7 @@ const flowRenewPrepare = {
|
|
|
314
316
|
summary: '借阅单续借:检查流程绑定并生成确认票据(不写数据)',
|
|
315
317
|
capability: 'archive',
|
|
316
318
|
risk: READ,
|
|
319
|
+
requiresConfirmation: true,
|
|
317
320
|
inputSchema: schemaOf({
|
|
318
321
|
dataId: { type: 'string', pattern: '^\\d+$', description: '借阅单主表数据 ID' },
|
|
319
322
|
reason: { type: 'string', description: '续借事由(必填,对话中向用户确认)' },
|
|
@@ -258,6 +258,7 @@ const intelligentPrepare = {
|
|
|
258
258
|
summary: '对电子文件库列表里勾选的数据发起智能识别(预检,不写数据):解析 treeId/formId 并生成确认票据',
|
|
259
259
|
capability: 'prelib',
|
|
260
260
|
risk: READ,
|
|
261
|
+
requiresConfirmation: true,
|
|
261
262
|
inputSchema: schemaOf({
|
|
262
263
|
treeId: {
|
|
263
264
|
type: 'string',
|
|
@@ -344,6 +345,7 @@ const arrangePrepare = {
|
|
|
344
345
|
summary: '对电子文件库列表里勾选的数据提交整理(预检,不写数据):解析 treeId/formId 并生成确认票据',
|
|
345
346
|
capability: 'prelib',
|
|
346
347
|
risk: READ,
|
|
348
|
+
requiresConfirmation: true,
|
|
347
349
|
inputSchema: schemaOf({
|
|
348
350
|
treeId: {
|
|
349
351
|
type: 'string',
|
|
@@ -43,6 +43,7 @@ const uploadPrepare = {
|
|
|
43
43
|
summary: '预归档上传预检:校验本地文件与目标全宗/电子文件库节点,并生成确认票据(不上传)',
|
|
44
44
|
capability: 'archive',
|
|
45
45
|
risk: READ,
|
|
46
|
+
requiresConfirmation: true,
|
|
46
47
|
inputSchema: schemaOf({
|
|
47
48
|
file: { type: 'string', description: '本地文件路径' },
|
|
48
49
|
fondsId: { type: 'string', pattern: '^\\d+$', description: '目标全宗 ID(archive.fonds.list 返回的 id)' },
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createArchiveOaContinuationSigner } from './continuation.js';
|
|
5
6
|
import { createArchiveOaHost } from './host.js';
|
|
6
7
|
import { archiveOaManifest } from './manifest.js';
|
|
@@ -130,8 +131,16 @@ export const archiveOaShortcut = {
|
|
|
130
131
|
const command = program.command('archive-oa').description('E10 档案定位与 OA 商务合同借阅');
|
|
131
132
|
command.command('schema')
|
|
132
133
|
.description('Print archive-oa operation manifest for agents')
|
|
133
|
-
.
|
|
134
|
-
|
|
134
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
135
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
136
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
137
|
+
.action(action((ctx, options) => {
|
|
138
|
+
const schema = schemaOptionsOf(options);
|
|
139
|
+
ctx.output.write(manifestView(archiveOaManifest, schema), {
|
|
140
|
+
json: true,
|
|
141
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
142
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
143
|
+
});
|
|
135
144
|
}));
|
|
136
145
|
withJsonInputOptions(command.command('run')
|
|
137
146
|
.description('Run an archive-oa operation with JSON input')
|
|
@@ -59,6 +59,7 @@ function makeAddOperations(carProfile, esb) {
|
|
|
59
59
|
summary: `把${esb.source === 'qys' ? '契约锁' : '泛微'}合同加入借阅车:校验条数并回查借阅车现状(不写数据)`,
|
|
60
60
|
capability: 'borrow-car',
|
|
61
61
|
risk: READ_BEFORE_WRITE,
|
|
62
|
+
requiresConfirmation: true,
|
|
62
63
|
inputSchema: schemaOf({
|
|
63
64
|
dataIds: {
|
|
64
65
|
...SCHEMA_ID_LIST,
|
|
@@ -166,6 +167,7 @@ function makeRemoveOperations(carProfile, esb) {
|
|
|
166
167
|
summary: `把${esb.source === 'qys' ? '契约锁' : '泛微'}借阅车记录移出借阅车:校验条数并回查借阅车现状(不写数据)`,
|
|
167
168
|
capability: 'borrow-car',
|
|
168
169
|
risk: READ_BEFORE_WRITE,
|
|
170
|
+
requiresConfirmation: true,
|
|
169
171
|
inputSchema: schemaOf({
|
|
170
172
|
dataIds: {
|
|
171
173
|
...SCHEMA_ID_LIST,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createZiguanjiaContinuationSigner } from './continuation.js';
|
|
5
6
|
import { createZiguanjiaHost } from './host.js';
|
|
6
7
|
import { ziguanjiaManifest } from './manifest.js';
|
|
@@ -99,8 +100,16 @@ export const assetShortcut = {
|
|
|
99
100
|
const asset = program.command('asset').description('E10 资产管理(资管家)');
|
|
100
101
|
asset.command('schema')
|
|
101
102
|
.description('Print asset operation manifest for agents')
|
|
102
|
-
.
|
|
103
|
-
|
|
103
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
104
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
105
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
106
|
+
.action(action((ctx, options) => {
|
|
107
|
+
const schema = schemaOptionsOf(options);
|
|
108
|
+
ctx.output.write(manifestView(ziguanjiaManifest, schema), {
|
|
109
|
+
json: true,
|
|
110
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
111
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
112
|
+
});
|
|
104
113
|
}));
|
|
105
114
|
withJsonInputOptions(asset.command('run')
|
|
106
115
|
.description('Run an asset operation with JSON input')
|
|
@@ -214,6 +214,7 @@ export const ziguanjiaOperations = [
|
|
|
214
214
|
{
|
|
215
215
|
name: 'asset.create',
|
|
216
216
|
risk: 'high-risk-write',
|
|
217
|
+
requiresConfirmation: true,
|
|
217
218
|
inputSchema: {
|
|
218
219
|
type: 'object',
|
|
219
220
|
additionalProperties: false,
|
|
@@ -239,6 +240,7 @@ export const ziguanjiaOperations = [
|
|
|
239
240
|
{
|
|
240
241
|
name: 'asset.update',
|
|
241
242
|
risk: 'high-risk-write',
|
|
243
|
+
requiresConfirmation: true,
|
|
242
244
|
inputSchema: {
|
|
243
245
|
type: 'object',
|
|
244
246
|
additionalProperties: false,
|
|
@@ -269,6 +271,7 @@ export const ziguanjiaOperations = [
|
|
|
269
271
|
{
|
|
270
272
|
name: 'asset.use',
|
|
271
273
|
risk: 'high-risk-write',
|
|
274
|
+
requiresConfirmation: true,
|
|
272
275
|
fixed: { uniqueIndent: ES_UNIQUE_INDENT.use },
|
|
273
276
|
inputSchema: {
|
|
274
277
|
type: 'object',
|
|
@@ -321,6 +324,7 @@ export const ziguanjiaOperations = [
|
|
|
321
324
|
{
|
|
322
325
|
name: 'asset.return.create',
|
|
323
326
|
risk: 'high-risk-write',
|
|
327
|
+
requiresConfirmation: true,
|
|
324
328
|
fixed: { uniqueIndent: ES_UNIQUE_INDENT.returnCreate },
|
|
325
329
|
inputSchema: {
|
|
326
330
|
type: 'object',
|
|
@@ -358,6 +362,7 @@ export const ziguanjiaOperations = [
|
|
|
358
362
|
{
|
|
359
363
|
name: 'asset.repair.create',
|
|
360
364
|
risk: 'high-risk-write',
|
|
365
|
+
requiresConfirmation: true,
|
|
361
366
|
fixed: { uniqueIndent: ES_UNIQUE_INDENT.repairCreate },
|
|
362
367
|
inputSchema: {
|
|
363
368
|
type: 'object',
|
|
@@ -392,6 +397,7 @@ export const ziguanjiaOperations = [
|
|
|
392
397
|
{
|
|
393
398
|
name: 'asset.purch',
|
|
394
399
|
risk: 'high-risk-write',
|
|
400
|
+
requiresConfirmation: true,
|
|
395
401
|
fixed: { uniqueIndent: ES_UNIQUE_INDENT.purch },
|
|
396
402
|
inputSchema: {
|
|
397
403
|
type: 'object',
|
|
@@ -423,6 +429,7 @@ export const ziguanjiaOperations = [
|
|
|
423
429
|
{
|
|
424
430
|
name: 'asset.depre',
|
|
425
431
|
risk: 'high-risk-write',
|
|
432
|
+
requiresConfirmation: true,
|
|
426
433
|
fixed: {
|
|
427
434
|
settingInterfacePk: EB_INTERFACE_PK.depreSetting,
|
|
428
435
|
precheckUniqueIndent: ES_UNIQUE_INDENT.deprePrecheck,
|