weaver-work-cli 0.1.80 → 0.1.81
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 +3 -1
- package/dist/chunks/{archive-ENBSUMHV.js → archive-KVV4SM7J.js} +3 -3
- package/dist/chunks/{archive-oa-7BFPQ6M5.js → archive-oa-VRSPNLY4.js} +3 -3
- package/dist/chunks/{asset-V5SUD3PW.js → asset-JZ5MN6OL.js} +306 -10
- package/dist/chunks/{asset-idle-3CEL7WFX.js → asset-idle-B4SAL43V.js} +3 -3
- package/dist/chunks/{attachment-content-SHXZUE3N.js → attachment-content-7W4XQTA7.js} +3 -3
- package/dist/chunks/{blog-FLI4SS3P.js → blog-XCBM467O.js} +3 -3
- package/dist/chunks/{caizhilian-7WCTKCCP.js → caizhilian-NZVUKCZD.js} +5 -5
- package/dist/chunks/{calendar-G726HUUH.js → calendar-OVM2SGYJ.js} +3 -3
- package/dist/chunks/{chunk-XNN5PZTI.js → chunk-3WZMDOI3.js} +1 -1
- package/dist/chunks/{chunk-TM2G7DNT.js → chunk-56F2GGE4.js} +5 -5
- package/dist/chunks/{chunk-LCM5SSGJ.js → chunk-5MM2IZ27.js} +423 -36
- package/dist/chunks/{chunk-BWFCTE43.js → chunk-5NQZO3CO.js} +48 -5
- package/dist/chunks/{chunk-KVCDZ2FX.js → chunk-5RIK6OLF.js} +7 -7
- package/dist/chunks/{chunk-5E2FDXBU.js → chunk-64RYQOXA.js} +1 -1
- package/dist/chunks/{chunk-44ZWNC7A.js → chunk-7BP3HU74.js} +2 -2
- package/dist/chunks/{chunk-3Q5F4C5B.js → chunk-AW3HQUOC.js} +5 -5
- package/dist/chunks/{chunk-7M5OYRK2.js → chunk-BD3M2YVN.js} +3 -3
- package/dist/chunks/{chunk-JEQHNNSS.js → chunk-BFVUBCYO.js} +14 -0
- package/dist/chunks/{chunk-PAWXVT6H.js → chunk-CLVEXDEJ.js} +4 -5
- package/dist/chunks/{chunk-TBCKK6LH.js → chunk-DWCMKEMO.js} +2 -2
- package/dist/chunks/{chunk-AVDEZLEB.js → chunk-E3XUYWYA.js} +4 -4
- package/dist/chunks/{chunk-3IX6L74V.js → chunk-FIPTUAOW.js} +2 -2
- package/dist/chunks/{chunk-4MAQALTM.js → chunk-GQEIHXY5.js} +6 -6
- package/dist/chunks/{chunk-TD5IOEGN.js → chunk-JUPKXW4P.js} +1 -1
- package/dist/chunks/{chunk-HYNOKFYJ.js → chunk-KZ3JR3GE.js} +3 -3
- package/dist/chunks/{chunk-4PBN7NJY.js → chunk-L2PKMZIU.js} +1 -1
- package/dist/chunks/{chunk-DACQKJ6O.js → chunk-LXWWOHM6.js} +4 -4
- package/dist/chunks/{chunk-7DE3VMZD.js → chunk-LYFPWZBD.js} +6 -1
- package/dist/chunks/{chunk-2UV4IZIT.js → chunk-MTIV6JEN.js} +2 -2
- package/dist/chunks/{chunk-WXV5FIKA.js → chunk-MWFKLXVU.js} +38 -38
- package/dist/chunks/{chunk-PMRNIGKZ.js → chunk-RVVRTW4P.js} +2 -2
- package/dist/chunks/{chunk-FPWCCRKT.js → chunk-UASZW22U.js} +3 -3
- package/dist/chunks/{chunk-RVEKGVZU.js → chunk-VMUVVTT4.js} +2 -2
- package/dist/chunks/{chunk-JQPKSQAK.js → chunk-W4BGNYKR.js} +1 -1
- package/dist/chunks/{chunk-OVTCWLNQ.js → chunk-W4R3SXJV.js} +15 -7
- package/dist/chunks/{chunk-UDBQJLQF.js → chunk-WF5G5SV3.js} +2 -2
- package/dist/chunks/{chunk-EGHRA2E3.js → chunk-WM5ZE67G.js} +1 -1
- package/dist/chunks/{chunk-QVKRNL7L.js → chunk-WQ4ZHAEZ.js} +10 -2
- package/dist/chunks/{chunk-JFZM3ZRU.js → chunk-X7OZKI6F.js} +12 -12
- package/dist/chunks/{chunk-YKTVK6XM.js → chunk-Y6HRTEDD.js} +1 -1
- package/dist/chunks/{chunk-2KW7AI6P.js → chunk-YFDKTTYX.js} +8 -5
- package/dist/chunks/{chunk-HKW5FYZR.js → chunk-YLPGCOAM.js} +76 -69
- package/dist/chunks/{chunk-LQLIXBJF.js → chunk-YXIPZFMX.js} +1 -1
- package/dist/chunks/{cli-JDTWQDDR.js → cli-VCQIDBDQ.js} +37 -37
- package/dist/chunks/{commands-J52MJ6NF.js → commands-THGXVOEL.js} +9 -5
- package/dist/chunks/{conflict-O4FXUTIX.js → conflict-T7URCNS6.js} +2 -2
- package/dist/chunks/{contract-GW7US3UF.js → contract-ZLGLQ45G.js} +3 -3
- package/dist/chunks/{cowork-GZDODGKF.js → cowork-2MBNOUYS.js} +21 -8
- package/dist/chunks/{create-flow-YIFMKM2C.js → create-flow-OFZC36MV.js} +6 -6
- package/dist/chunks/{data-HTQZRPPI.js → data-6O7ANJVT.js} +3 -3
- package/dist/chunks/{ebuilder-form-GHNIZ7ET.js → ebuilder-form-OJ3KJVQI.js} +4 -4
- package/dist/chunks/{ehr-7TGZTZR3.js → ehr-NWMI5Q7S.js} +4 -4
- package/dist/chunks/{employee-QX57HEWS.js → employee-O2EPUYIH.js} +2 -2
- package/dist/chunks/{entry-mode-X3KKRN36.js → entry-mode-TVACGU7K.js} +3 -3
- package/dist/chunks/{env-MCVDVISU.js → env-EWG4ZAWP.js} +2 -2
- package/dist/chunks/{esb-ATRKVHCD.js → esb-56FV2PIA.js} +5 -5
- package/dist/chunks/{factory-ALB7DMVY.js → factory-GQSEJRDY.js} +1 -1
- package/dist/chunks/{fna-IKYI3SST.js → fna-YLA3RKRW.js} +3 -3
- package/dist/chunks/{group-chat-GGPL2EBF.js → group-chat-5R6L3LCG.js} +3 -3
- package/dist/chunks/{host-UY4LQPN4.js → host-42MLO4KX.js} +4 -4
- package/dist/chunks/{host-XXGDQM7D.js → host-J72VEDW5.js} +4 -4
- package/dist/chunks/{host-EJSJSLVK.js → host-QKCRQS2C.js} +4 -4
- package/dist/chunks/{host-EYNLB6S4.js → host-W3BVEATN.js} +4 -4
- package/dist/chunks/{host-OT4KNR3G.js → host-YJINI5GG.js} +4 -4
- package/dist/chunks/{host-6UOXYOOY.js → host-ZVGBZOHY.js} +4 -4
- package/dist/chunks/{hrm-5JQ7QZ6A.js → hrm-3JFZNB42.js} +66 -26
- package/dist/chunks/{im-2YJW3EI5.js → im-HKIRPCGD.js} +5 -5
- package/dist/chunks/{invoice-36BCXKOX.js → invoice-4PREIOTG.js} +80 -17
- package/dist/chunks/{jiuchuanhui-KBWUZ7WT.js → jiuchuanhui-K3PLNENZ.js} +3 -3
- package/dist/chunks/{lazy-dispatch-ZDKLS5MR.js → lazy-dispatch-MKGEWZNM.js} +8 -8
- package/dist/chunks/{mail-YBKUM6HM.js → mail-6QPVWKXM.js} +3 -3
- package/dist/chunks/{meeting-MU3RHAEX.js → meeting-QPPEPBSN.js} +15 -15
- package/dist/chunks/{minute-doc-NHIEZEHU.js → minute-doc-JMIDZK5D.js} +1 -1
- package/dist/chunks/{okr-HW7IULIR.js → okr-67C5LQYD.js} +3 -3
- package/dist/chunks/{operations-4P2UYVLH.js → operations-YLKRNAPI.js} +5 -5
- package/dist/chunks/{org-MWWIFNAO.js → org-L5XDM2RQ.js} +2 -2
- package/dist/chunks/{performance-PM2G6L3E.js → performance-33QZZR4I.js} +3 -3
- package/dist/chunks/{plan-3YYGZ7ZM.js → plan-W4BPONRL.js} +3 -3
- package/dist/chunks/{project-6PRGBLO2.js → project-OKSEH6AF.js} +3 -3
- package/dist/chunks/{reception-7G3J2MA6.js → reception-H5M7SPHT.js} +3 -3
- package/dist/chunks/{recruit-stage-5KK7R37U.js → recruit-stage-O2JGNVMO.js} +12 -8
- package/dist/chunks/{registry-4S3RXXWS.js → registry-45VEUYTC.js} +4 -4
- package/dist/chunks/{registry-3VTB3KLV.js → registry-BMTQ55G5.js} +5 -5
- package/dist/chunks/{registry-KQ4TNUWO.js → registry-PYONXFUF.js} +3 -3
- package/dist/chunks/{registry-HWUNNXDU.js → registry-SAMJ4VH2.js} +14 -14
- package/dist/chunks/{registry-AC33ZZVH.js → registry-YY62OFKQ.js} +1 -1
- package/dist/chunks/{room-recommend-V4BSHR2M.js → room-recommend-NRLAZJCI.js} +4 -4
- package/dist/chunks/{schedule-T7W357TN.js → schedule-LNBOCBP5.js} +4 -4
- package/dist/chunks/{smart-extract-T5Z4AULN.js → smart-extract-JOTX6UZC.js} +3 -3
- package/dist/chunks/{update-77ZUIYSG.js → update-BERR64TI.js} +3 -3
- package/dist/chunks/{workflow-SYCBS5XD.js → workflow-ZDQY3TI7.js} +5 -5
- package/dist/core/runtime-agent.js +19 -3
- package/dist/index.js +4 -4
- package/dist/internal/e10/auth/agent-host-key.js +10 -1
- package/dist/internal/e10/auth/commands.js +20 -4
- package/dist/internal/e10/auth/xiaoe.js +15 -3
- package/dist/shortcuts/asset/host.js +39 -1
- package/dist/shortcuts/asset/index.js +16 -2
- package/dist/shortcuts/asset/manifest.js +115 -1
- package/dist/shortcuts/asset/operations/audit-report.js +144 -0
- package/dist/shortcuts/asset/operations/registry.js +4 -0
- package/dist/shortcuts/asset/operations/write.js +7 -1
- package/dist/shortcuts/cowork/operations/read.js +13 -6
- package/dist/shortcuts/cowork/operations/shared.js +15 -0
- package/dist/shortcuts/hrm/host.js +51 -4
- package/dist/shortcuts/hrm/index.js +45 -26
- package/dist/shortcuts/hrm/manifest.js +17 -0
- package/dist/shortcuts/hrm/operations/employee.js +3 -7
- package/dist/shortcuts/hrm/operations/org.js +2 -4
- package/dist/shortcuts/hrm/operations/position.js +2 -4
- package/dist/shortcuts/hrm/operations/shared.js +21 -0
- package/dist/shortcuts/hrm/operations.js +34 -0
- package/dist/shortcuts/im/constants.js +163 -0
- package/dist/shortcuts/im/host.js +12 -5
- package/dist/shortcuts/im/operations/at-mention.js +4 -2
- package/dist/shortcuts/im/operations/file-user.js +3 -1
- package/dist/shortcuts/im/operations/msg-sync.js +219 -2
- package/dist/shortcuts/im/operations/msg-write.js +70 -30
- package/dist/shortcuts/invoice/invoice-record.js +4 -0
- package/dist/shortcuts/invoice/manifest.js +1 -1
- package/dist/shortcuts/invoice/operations/reim-auto.js +10 -7
- package/dist/shortcuts/invoice/read-enrichment.js +74 -7
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +1 -1
- package/dist/shortcuts/meeting/operations/rooms.js +7 -0
- package/dist/shortcuts/recruit-stage/operations/list.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/profile.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/tag.js +5 -0
- package/dist/shortcuts/workflow/operations/form.js +2 -1
- package/docs/agent-invoice.md +1 -1
- package/docs/e10-auth.md +14 -1
- package/docs/hrm.md +5 -1
- package/docs/invoice.md +1 -1
- package/docs/ziguanjia.md +5 -1
- package/package.json +1 -1
- package/skill-template/business-info.json +6 -1
- package/skill-template/domains/hrm.md +1 -1
- package/skill-template/domains/yepiaotong.md +1 -1
- package/skill-template/domains/ziguanjia.md +7 -2
- package/skills/weaver-e10-cowork/SKILL.md +13 -1
- package/skills/weaver-e10-hrm/SKILL.md +16 -2
- package/skills/weaver-e10-hrm/references/org.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +24 -15
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +14 -7
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +12 -1
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +18 -1
- package/skills/weaver-e10-recruit-stage/lib/resume-import-once.mjs +308 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +9 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +54 -15
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +456 -93
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +2 -2
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +1 -1
- package/skills/weaver-e10-shared-report.html +874 -0
- package/skills/weaver-e10-workflow/SKILL.md +4 -4
- package/skills/weaver-e10-workflow/aiDeepRead/config.json +138 -142
- package/skills/weaver-e10-workflow/references/workflow-deep-read.md +7 -7
- package/skills/weaver-e10-yepiaotong/SKILL.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +5 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +34 -32
- package/skills/weaver-e10-yepiaotong.zip +0 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +12 -9
- package/skills/weaver-e10-yimiaoban/references/constants.md +291 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +10 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +3 -1
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +175 -36
- package/skills/weaver-e10-ziguanjia/SKILL.md +26 -6
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +1373 -96
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-audit.md +63 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +5 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-idle.md +52 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-report.md +59 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
createE10RequestRuntime,
|
|
14
14
|
getE10Session,
|
|
15
15
|
requireE10Session
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UASZW22U.js";
|
|
17
17
|
import {
|
|
18
18
|
E10_AUTH_REQUIRED_MESSAGE
|
|
19
19
|
} from "./chunk-IZCQU5D5.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-WQ4ZHAEZ.js";
|
|
21
21
|
import "./chunk-Y3C6MDL7.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-LYFPWZBD.js";
|
|
23
23
|
import "./chunk-2BZ7TY4M.js";
|
|
24
24
|
import {
|
|
25
25
|
CliError,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ehrValidationError,
|
|
6
6
|
isSelfTenant,
|
|
7
7
|
toMenuList
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y6HRTEDD.js";
|
|
9
9
|
import {
|
|
10
10
|
MANIFEST_LIST_COMPACT_PATHS,
|
|
11
11
|
manifestView,
|
|
@@ -23,15 +23,15 @@ import {
|
|
|
23
23
|
createE10RequestRuntime,
|
|
24
24
|
isE10SessionExpiredResponse,
|
|
25
25
|
requireE10Session
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UASZW22U.js";
|
|
27
27
|
import {
|
|
28
28
|
E10_SESSION_EXPIRED_MESSAGE
|
|
29
29
|
} from "./chunk-IZCQU5D5.js";
|
|
30
30
|
import {
|
|
31
31
|
getActiveProfile
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
33
33
|
import "./chunk-Y3C6MDL7.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-LYFPWZBD.js";
|
|
35
35
|
import "./chunk-2BZ7TY4M.js";
|
|
36
36
|
import {
|
|
37
37
|
CliError,
|
|
@@ -5835,7 +5835,7 @@ async function runList(env, args, feedbackTodoMode) {
|
|
|
5835
5835
|
const appId = cache.appId;
|
|
5836
5836
|
const type = String(args.type || (feedbackTodoMode ? "interview" : ""));
|
|
5837
5837
|
if (!type || !TYPES[type]) {
|
|
5838
|
-
throw
|
|
5838
|
+
throw rsValidationError("type_invalid", "type \u5FC5\u987B\u662F demand|position|entry|offer|interview|candidate \u4E4B\u4E00");
|
|
5839
5839
|
}
|
|
5840
5840
|
const t = TYPES[type];
|
|
5841
5841
|
const pageSize = Number(args.pageSize || (feedbackTodoMode ? 200 : 10));
|
|
@@ -6971,7 +6971,7 @@ async function handlerSearchByTag(args, env) {
|
|
|
6971
6971
|
throw rsFail("\u6309\u6807\u7B7E\u641C\u7D22\u4ECD\u4F9D\u8D56\u4EBA\u624D\u5217\u8868\u89C6\u56FE listId\uFF1B\u5F53\u524D\u8D26\u53F7\u672A\u89E3\u6790\u5230\u8BE5\u5165\u53E3\u3002\u8BF7\u6539\u7528\u59D3\u540D/\u624B\u673A\u53F7/\u5173\u952E\u8BCD\u7684 candidate.search\uFF0C\u6216\u7531\u73AF\u5883\u914D\u7F6E\u4EBA\u624D\u5E93\u5217\u8868\u89C6\u56FE\u3002");
|
|
6972
6972
|
}
|
|
6973
6973
|
const wanted = (Array.isArray(args.tags) ? args.tags : [args.tags]).map((x) => String(x == null ? "" : x).trim()).filter(Boolean);
|
|
6974
|
-
if (!wanted.length) throw
|
|
6974
|
+
if (!wanted.length) throw rsValidationError("tags_required", '\u8BF7\u63D0\u4F9B\u8981\u641C\u7D22\u7684\u6807\u7B7E\u540D\uFF0C\u4F8B\u5982\uFF1A{"tags":["985"]}\u3002');
|
|
6975
6975
|
const match = args.match === "all" ? "all" : "any";
|
|
6976
6976
|
const pageSize = clampInt(args.pageSize, 1, 100, 20);
|
|
6977
6977
|
const current = clampInt(args.current, 1, 1e4, 1);
|
|
@@ -7360,6 +7360,10 @@ function prepareOperation() {
|
|
|
7360
7360
|
}, { required: ["talentId", "tags"] }),
|
|
7361
7361
|
handler: async (args, env) => {
|
|
7362
7362
|
const talentId = normName(args.talentId);
|
|
7363
|
+
const tagsGiven = Array.isArray(args.tags) && args.tags.length > 0;
|
|
7364
|
+
if (!talentId && !tagsGiven) {
|
|
7365
|
+
throw rsValidationError("params_required", '\u7F3A\u5C11\u5FC5\u586B\u53C2\u6570\uFF1AtalentId\uFF08\u4EBA\u624D id\uFF09\u3001tags\uFF08\u6807\u7B7E\u6E05\u5355\uFF0C\u5982 ["985"]\uFF09');
|
|
7366
|
+
}
|
|
7363
7367
|
if (!talentId) throw rsValidationError("talent_id_required", "\u8BF7\u63D0\u4F9B talentId");
|
|
7364
7368
|
const plan = await buildPlan2(env.host, args, talentId);
|
|
7365
7369
|
const existing = await Promise.all([0, 1].map(async (type) => {
|
|
@@ -7508,7 +7512,7 @@ async function handlerProfile(args, env) {
|
|
|
7508
7512
|
const ctx = { host, baseUrl: session.baseUrl.replace(/\/+$/, ""), appId: "", cache: await env.recruitContext() };
|
|
7509
7513
|
ctx.appId = ctx.cache.appId;
|
|
7510
7514
|
const talentId = String(args.talentId || "").trim();
|
|
7511
|
-
if (!talentId) throw
|
|
7515
|
+
if (!talentId) throw rsValidationError("talent_id_required", "talentId \u5FC5\u586B");
|
|
7512
7516
|
const objId = objIdOf(ctx.cache, "talent_pool");
|
|
7513
7517
|
const formId = formIdOf(ctx.cache, "talent_pool");
|
|
7514
7518
|
const fields = ctx.cache.fields[objId] || {};
|
|
@@ -7665,7 +7669,7 @@ function slimProfile(profile, full) {
|
|
|
7665
7669
|
async function handlerShortlist(args, env) {
|
|
7666
7670
|
const keyword = String(args.keyword || "").trim();
|
|
7667
7671
|
if (!keyword) {
|
|
7668
|
-
throw
|
|
7672
|
+
throw rsValidationError("keyword_required", 'keyword \u5FC5\u586B\uFF1A\u8BF7\u63D0\u4F9B\u8981\u68C0\u7D22\u7684\u5173\u952E\u8BCD\uFF0C\u4F8B\u5982 {"keyword":"Java\u5F00\u53D1"}');
|
|
7669
7673
|
}
|
|
7670
7674
|
const limit = clampInt2(args.limit, 1, 10, 5);
|
|
7671
7675
|
const concurrency = clampInt2(args.concurrency, 1, 10, 10);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
getHrmOperation,
|
|
5
5
|
hasHrmOperation,
|
|
6
6
|
hrmOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-AW3HQUOC.js";
|
|
8
|
+
import "./chunk-CLVEXDEJ.js";
|
|
9
|
+
import "./chunk-BD3M2YVN.js";
|
|
10
|
+
import "./chunk-BFVUBCYO.js";
|
|
11
11
|
import "./chunk-56EZERK4.js";
|
|
12
12
|
import "./chunk-UG5G54VL.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
esbOperationDefinitions,
|
|
5
5
|
getEsbOperation,
|
|
6
6
|
hasEsbOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-64RYQOXA.js";
|
|
8
|
+
import "./chunk-VMUVVTT4.js";
|
|
9
9
|
import "./chunk-TXUG266F.js";
|
|
10
10
|
import "./chunk-7BDPM5ST.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-UASZW22U.js";
|
|
12
12
|
import "./chunk-IZCQU5D5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-WQ4ZHAEZ.js";
|
|
14
14
|
import "./chunk-Y3C6MDL7.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-LYFPWZBD.js";
|
|
16
16
|
import "./chunk-2BZ7TY4M.js";
|
|
17
17
|
import "./chunk-UG5G54VL.js";
|
|
18
18
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getWorkflowOperation,
|
|
5
5
|
hasWorkflowOperation,
|
|
6
6
|
workflowOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-L2PKMZIU.js";
|
|
8
8
|
import "./chunk-HP7JIYMT.js";
|
|
9
9
|
import "./chunk-WRXSAVKO.js";
|
|
10
10
|
import "./chunk-JJONWB5N.js";
|
|
@@ -12,9 +12,9 @@ import "./chunk-257JXJGD.js";
|
|
|
12
12
|
import "./chunk-AJ62BGAW.js";
|
|
13
13
|
import "./chunk-7BDPM5ST.js";
|
|
14
14
|
import "./chunk-IZCQU5D5.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-WQ4ZHAEZ.js";
|
|
16
16
|
import "./chunk-Y3C6MDL7.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-LYFPWZBD.js";
|
|
18
18
|
import "./chunk-2BZ7TY4M.js";
|
|
19
19
|
import "./chunk-UG5G54VL.js";
|
|
20
20
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-YLPGCOAM.js";
|
|
8
|
+
import "./chunk-FIPTUAOW.js";
|
|
9
|
+
import "./chunk-GQEIHXY5.js";
|
|
10
10
|
import "./chunk-WMRNO6IU.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-X7OZKI6F.js";
|
|
12
|
+
import "./chunk-7BP3HU74.js";
|
|
13
|
+
import "./chunk-56F2GGE4.js";
|
|
14
|
+
import "./chunk-MWFKLXVU.js";
|
|
15
|
+
import "./chunk-5RIK6OLF.js";
|
|
16
|
+
import "./chunk-E3XUYWYA.js";
|
|
17
|
+
import "./chunk-WM5ZE67G.js";
|
|
18
|
+
import "./chunk-W4BGNYKR.js";
|
|
19
|
+
import "./chunk-KZ3JR3GE.js";
|
|
20
20
|
import "./chunk-7BDPM5ST.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WQ4ZHAEZ.js";
|
|
22
22
|
import "./chunk-Y3C6MDL7.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-LYFPWZBD.js";
|
|
24
24
|
import "./chunk-2BZ7TY4M.js";
|
|
25
25
|
import "./chunk-UG5G54VL.js";
|
|
26
26
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -3,7 +3,7 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getImOperation,
|
|
5
5
|
imOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5MM2IZ27.js";
|
|
7
7
|
import "./chunk-IC62NFM5.js";
|
|
8
8
|
import "./chunk-KMRT7NAT.js";
|
|
9
9
|
import "./chunk-UG5G54VL.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
loadRooms,
|
|
8
8
|
recommendRooms,
|
|
9
9
|
rememberFrequentRoom
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-E3XUYWYA.js";
|
|
11
|
+
import "./chunk-WM5ZE67G.js";
|
|
12
|
+
import "./chunk-W4BGNYKR.js";
|
|
13
|
+
import "./chunk-KZ3JR3GE.js";
|
|
14
14
|
import "./chunk-7BDPM5ST.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolveMeetingScheduleTypeIds,
|
|
9
9
|
resolveMemberIdsByName,
|
|
10
10
|
runScheduleConflictFlow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-56F2GGE4.js";
|
|
12
|
+
import "./chunk-WM5ZE67G.js";
|
|
13
|
+
import "./chunk-W4BGNYKR.js";
|
|
14
|
+
import "./chunk-KZ3JR3GE.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
createE10RequestRuntime,
|
|
22
22
|
isE10SessionExpiredResponse,
|
|
23
23
|
requireE10Session
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UASZW22U.js";
|
|
25
25
|
import "./chunk-IZCQU5D5.js";
|
|
26
26
|
import {
|
|
27
27
|
getActiveProfile
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
29
29
|
import "./chunk-Y3C6MDL7.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-LYFPWZBD.js";
|
|
31
31
|
import "./chunk-2BZ7TY4M.js";
|
|
32
32
|
import {
|
|
33
33
|
CliError,
|
|
@@ -2,9 +2,9 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-JUPKXW4P.js";
|
|
6
|
+
import "./chunk-YXIPZFMX.js";
|
|
7
|
+
import "./chunk-LYFPWZBD.js";
|
|
8
8
|
import "./chunk-2BZ7TY4M.js";
|
|
9
9
|
import "./chunk-UG5G54VL.js";
|
|
10
10
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
validateRuleFile,
|
|
15
15
|
workflowOperationDefinitions,
|
|
16
16
|
workflowSuccess
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L2PKMZIU.js";
|
|
18
18
|
import {
|
|
19
19
|
createWorkflowContinuationSigner
|
|
20
20
|
} from "./chunk-HP7JIYMT.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowHost
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DWCMKEMO.js";
|
|
24
24
|
import {
|
|
25
25
|
CLARIFICATION_SUBTYPE,
|
|
26
26
|
WorkflowCliError,
|
|
@@ -36,11 +36,11 @@ import "./chunk-7BDPM5ST.js";
|
|
|
36
36
|
import {
|
|
37
37
|
reportPlatformError
|
|
38
38
|
} from "./chunk-MD5CW4B6.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-UASZW22U.js";
|
|
40
40
|
import "./chunk-IZCQU5D5.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-WQ4ZHAEZ.js";
|
|
42
42
|
import "./chunk-Y3C6MDL7.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-LYFPWZBD.js";
|
|
44
44
|
import "./chunk-2BZ7TY4M.js";
|
|
45
45
|
import {
|
|
46
46
|
isCliError,
|
|
@@ -17,11 +17,27 @@ export function isXiaoERuntimeAgent(value) {
|
|
|
17
17
|
export function isXiaoERuntime(options) {
|
|
18
18
|
return isXiaoERuntimeAgent(options?.runtimeAgent);
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* 小e 宿主注入的环境变量前缀。只检查 key 是否存在,不读取值——
|
|
22
|
+
* `XIAOE_DOMAIN` / `XIAOE_USER_TOKEN` / `XIAOE_CLIENT_TYPE` 乃至空值占位变量都算。
|
|
23
|
+
*/
|
|
24
|
+
const XIAOE_ENV_PREFIX = 'XIAOE_';
|
|
25
|
+
/** 进程环境里是否存在任一 `XIAOE_*` 变量(宿主判定与登录分区共用的唯一环境判据)。 */
|
|
26
|
+
export function hasXiaoEEnvMarker(env = process.env) {
|
|
27
|
+
return Object.keys(env).some((key) => key.startsWith(XIAOE_ENV_PREFIX));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Runtime identity only: installed clients and saved login sessions are not host evidence.
|
|
31
|
+
*
|
|
32
|
+
* 优先级:`XIAOE_*` 环境变量最高。宿主实际注入了什么,比任何自报身份都可靠;
|
|
33
|
+
* 因此即使 Agent 传了 `--runtime-agent workbuddy`,环境里只要有 `XIAOE_*` 就判为小e。
|
|
34
|
+
* 其余顺序保持原样:显式 `--runtime-agent` > `WORKBUDDY_AGENT_TYPE` / `CODEX_AGENT_TYPE`
|
|
35
|
+
* > 其他框架标记 > `WEAVER_AGENT_TYPE`。
|
|
36
|
+
*/
|
|
21
37
|
export function isXiaoEHostEnvironment(env, options = {}) {
|
|
22
|
-
if (
|
|
38
|
+
if (hasXiaoEEnvMarker(env))
|
|
23
39
|
return true;
|
|
24
|
-
if (
|
|
40
|
+
if (isXiaoERuntime(options))
|
|
25
41
|
return true;
|
|
26
42
|
const explicitHost = env.WORKBUDDY_AGENT_TYPE?.trim() || env.CODEX_AGENT_TYPE?.trim();
|
|
27
43
|
if (explicitHost)
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from "./chunks/chunk-257JXJGD.js";
|
|
12
12
|
import {
|
|
13
13
|
UpdateService
|
|
14
|
-
} from "./chunks/chunk-
|
|
15
|
-
import "./chunks/chunk-
|
|
14
|
+
} from "./chunks/chunk-YXIPZFMX.js";
|
|
15
|
+
import "./chunks/chunk-LYFPWZBD.js";
|
|
16
16
|
import {
|
|
17
17
|
packageRootDir
|
|
18
18
|
} from "./chunks/chunk-2BZ7TY4M.js";
|
|
@@ -85,7 +85,7 @@ async function bootstrap(argv = process.argv.slice(2)) {
|
|
|
85
85
|
const [{ createProgram }, { registerCommands }, { updateCommand }] = await Promise.all([
|
|
86
86
|
import("./chunks/root-YZG2TS5W.js"),
|
|
87
87
|
import("./chunks/register-SQOPIR2G.js"),
|
|
88
|
-
import("./chunks/update-
|
|
88
|
+
import("./chunks/update-BERR64TI.js")
|
|
89
89
|
]);
|
|
90
90
|
const { program, ctx } = createProgram();
|
|
91
91
|
await registerCommands(program, ctx, [updateCommand]);
|
|
@@ -112,7 +112,7 @@ async function bootstrap(argv = process.argv.slice(2)) {
|
|
|
112
112
|
var startup = await bootstrap();
|
|
113
113
|
if (!startup.handled) {
|
|
114
114
|
try {
|
|
115
|
-
await import("./chunks/cli-
|
|
115
|
+
await import("./chunks/cli-VCQIDBDQ.js");
|
|
116
116
|
} finally {
|
|
117
117
|
startup.release?.();
|
|
118
118
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* 关键约束:**不能用 `resolveAgentType()` 的返回值当 key**。它的 fallback 是
|
|
9
9
|
* `weaver-work-cli`,会让「终端手工执行」也写出一条宿主记录,污染分区。
|
|
10
10
|
*/
|
|
11
|
-
import { isXiaoERuntimeAgent } from '../../../core/runtime-agent.js';
|
|
11
|
+
import { hasXiaoEEnvMarker, isXiaoERuntimeAgent } from '../../../core/runtime-agent.js';
|
|
12
12
|
function hasEnvPrefix(env, prefix) {
|
|
13
13
|
return Object.keys(env).some((key) => key === prefix || key.startsWith(`${prefix}_`));
|
|
14
14
|
}
|
|
@@ -30,7 +30,16 @@ const AGENT_HOST_PREFIXES = [
|
|
|
30
30
|
];
|
|
31
31
|
/** 无任何宿主标识时的分区,表示终端/未知宿主。 */
|
|
32
32
|
export const DEFAULT_AGENT_HOST_KEY = 'default';
|
|
33
|
+
/**
|
|
34
|
+
* 解析当前进程所属的宿主 key(登录分区)。
|
|
35
|
+
*
|
|
36
|
+
* 优先级与 `isXiaoEHostEnvironment` 保持一致:`XIAOE_*` 环境变量最高——
|
|
37
|
+
* 宿主真实注入的标记优先于任何自报身份,否则会出现「业务按小e 跑、登录却读写
|
|
38
|
+
* 另一个宿主的 profile」这种两层口径打架的情况。
|
|
39
|
+
*/
|
|
33
40
|
export function resolveSessionHostKey(env, options = {}) {
|
|
41
|
+
if (hasXiaoEEnvMarker(env))
|
|
42
|
+
return 'xiaoe';
|
|
34
43
|
if (isXiaoERuntimeAgent(options.runtimeAgent))
|
|
35
44
|
return 'xiaoe';
|
|
36
45
|
return resolveAgentHostKey(env, options.runtimeAgent);
|
|
@@ -10,8 +10,8 @@ import { lookupAgentHost, resolveLoginProfileName, upsertAgentHost } from './age
|
|
|
10
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
|
-
import { XIAOE_AGENT_TYPE, createXiaoEUnifiedLoginUnavailableError, hasXiaoEEnv, inspectXiaoEUnifiedLoginSources, resolveDefaultE10BaseUrl, resolveXiaoEPreferredBaseUrl, tryXiaoEUnifiedLogin as tryXiaoEUnifiedSessionLogin, } from './xiaoe.js';
|
|
14
|
-
export { DEFAULT_E10_BASE_URL, DEFAULT_E10_LOGIN_BASE_URL, XIAOE_AGENT_TYPE, hasXiaoEEnv, hasXiaoETokenScript, hasXiaoEUnifiedLoginSource, isXiaoEHostedEnvironment, inspectXiaoEUnifiedLoginSources, resolveDefaultE10BaseUrl, resolveXiaoEDefaultBaseUrl, resolveXiaoEPreferredBaseUrl, resolveXiaoEUnifiedLoginCredential, } from './xiaoe.js';
|
|
13
|
+
import { XIAOE_AGENT_TYPE, createXiaoEUnifiedLoginUnavailableError, hasXiaoEEnv, inspectXiaoEUnifiedLoginSources, resolveConfiguredE10BaseUrl, resolveDefaultE10BaseUrl, resolveXiaoEPreferredBaseUrl, tryXiaoEUnifiedLogin as tryXiaoEUnifiedSessionLogin, } from './xiaoe.js';
|
|
14
|
+
export { DEFAULT_E10_BASE_URL, DEFAULT_E10_LOGIN_BASE_URL, XIAOE_AGENT_TYPE, hasXiaoEEnv, hasXiaoETokenScript, hasXiaoEUnifiedLoginSource, isXiaoEHostedEnvironment, inspectXiaoEUnifiedLoginSources, resolveConfiguredE10BaseUrl, resolveDefaultE10BaseUrl, resolveXiaoEDefaultBaseUrl, resolveXiaoEPreferredBaseUrl, resolveXiaoEUnifiedLoginCredential, } from './xiaoe.js';
|
|
15
15
|
const DEFAULT_AGENT_TYPE = 'weaver-work-cli';
|
|
16
16
|
const EXPLICIT_AGENT_TYPE_ENV_KEYS = [
|
|
17
17
|
'WORKBUDDY_AGENT_TYPE',
|
|
@@ -802,6 +802,18 @@ async function runXiaoELogin(ctx, options) {
|
|
|
802
802
|
}).catch((logError) => ctx.logger.debug(`Could not persist XiaoE auth error log: ${logError instanceof Error ? logError.message : String(logError)}`));
|
|
803
803
|
throw error;
|
|
804
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
* 浏览器登录与手填 ETEAMSID 的域名解析顺序:
|
|
807
|
+
* 显式参数 > 当前 profile 配置 > 宿主注入的默认域名(`WEAVER_XIAOE_DEFAULT_DOMAIN`、
|
|
808
|
+
* `WEAVER_XIAOE_E10_DOMAIN` 等)> 硬编码兜底域名。
|
|
809
|
+
*
|
|
810
|
+
* 宿主默认域排在 profile 之后是刻意的:profile 代表用户上一次显式登录选的租户,
|
|
811
|
+
* 环境变量只补「还没有任何线索」的场景,不能把已登录用户的租户顶掉。
|
|
812
|
+
*/
|
|
813
|
+
export function resolveLoginBaseUrl(env, explicitCandidates) {
|
|
814
|
+
const explicit = explicitCandidates.find((value) => (value || '').trim()) || '';
|
|
815
|
+
return normalizeUrl(explicit || resolveConfiguredE10BaseUrl(env) || resolveDefaultE10BaseUrl(env));
|
|
816
|
+
}
|
|
805
817
|
export async function runBrowserLogin(ctx, options, loginMode = {}) {
|
|
806
818
|
const commandOpts = asOptions(options);
|
|
807
819
|
const globalOptions = ctx.getGlobalOptions();
|
|
@@ -815,7 +827,7 @@ export async function runBrowserLogin(ctx, options, loginMode = {}) {
|
|
|
815
827
|
explicitAgentType,
|
|
816
828
|
});
|
|
817
829
|
const hostKey = target.hostKey;
|
|
818
|
-
const baseUrl =
|
|
830
|
+
const baseUrl = resolveLoginBaseUrl(ctx.env, [explicitBaseUrl, target.cfg.baseUrl]);
|
|
819
831
|
const tenantKey = optionString(commandOpts, 'tenantKey');
|
|
820
832
|
const explicitPort = optionString(commandOpts, 'port');
|
|
821
833
|
const portText = explicitPort || '19800';
|
|
@@ -1323,7 +1335,11 @@ export function registerE10AuthCommands(parent, action) {
|
|
|
1323
1335
|
explicitAgentType: optionString(commandOpts, 'agentType', 'agent_type'),
|
|
1324
1336
|
});
|
|
1325
1337
|
const cfg = target.cfg;
|
|
1326
|
-
const baseUrl =
|
|
1338
|
+
const baseUrl = resolveLoginBaseUrl(ctx.env, [
|
|
1339
|
+
optionString(commandOpts, 'baseUrl'),
|
|
1340
|
+
globalOptions.baseUrl,
|
|
1341
|
+
cfg.baseUrl,
|
|
1342
|
+
]);
|
|
1327
1343
|
const passportUrl = normalizeUrl(optionString(commandOpts, 'passportUrl') || globalOptions.passportUrl || cfg.passportUrl || baseUrl);
|
|
1328
1344
|
const tenantKeyFallback = optionString(commandOpts, 'tenantKey');
|
|
1329
1345
|
const agentType = resolveAgentType(commandOpts, ctx.env);
|
|
@@ -484,15 +484,27 @@ function normalizeBaseUrlValue(value) {
|
|
|
484
484
|
return '';
|
|
485
485
|
return /^https?:\/\//i.test(raw) ? raw : `https://${raw}`;
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
/**
|
|
488
|
+
* 环境里显式配置的 E10 目标域(`WEAVER_XIAOE_DEFAULT_DOMAIN` 等默认域名,
|
|
489
|
+
* 其次 `WEAVER_XIAOE_E10_DOMAIN` / `WEAVER_XIAOE_E10_BASE_URL` 等单域名)。
|
|
490
|
+
*
|
|
491
|
+
* 只认「域名」类变量,**不**包含 `WEAVER_XIAOE_AUTH_MAP` 这类凭据映射:
|
|
492
|
+
* 映射里的域名是配合 ETEAMSID 换票用的,不该决定浏览器登录要打开哪个租户。
|
|
493
|
+
* `XIAOE_DOMAIN` 同理不属于这里——它是 XiaoE/erpa 换票服务地址。
|
|
494
|
+
*/
|
|
495
|
+
export function resolveConfiguredE10BaseUrl(env = process.env) {
|
|
488
496
|
const explicitDefault = envString(env, ...XIAOE_DEFAULT_DOMAIN_ENV_KEYS);
|
|
489
497
|
if (explicitDefault)
|
|
490
498
|
return normalizeBaseUrlValue(explicitDefault);
|
|
491
|
-
// XIAOE_DOMAIN is the XiaoE/erpa service address used to exchange
|
|
492
|
-
// XIAOE_USER_TOKEN. Only dedicated E10 variables may select the target E10.
|
|
493
499
|
const singleDomain = envString(env, ...XIAOE_SINGLE_DOMAIN_ENV_KEYS);
|
|
494
500
|
if (singleDomain)
|
|
495
501
|
return normalizeBaseUrlValue(singleDomain);
|
|
502
|
+
return '';
|
|
503
|
+
}
|
|
504
|
+
function resolveXiaoEConfiguredBaseUrl(env) {
|
|
505
|
+
const configured = resolveConfiguredE10BaseUrl(env);
|
|
506
|
+
if (configured)
|
|
507
|
+
return configured;
|
|
496
508
|
const firstCredential = listXiaoEUnifiedLoginCredentials(env)[0];
|
|
497
509
|
if (firstCredential?.baseUrl)
|
|
498
510
|
return normalizeUrl(firstCredential.baseUrl);
|
|
@@ -413,7 +413,45 @@ export function createZiguanjiaHost(ctx) {
|
|
|
413
413
|
}
|
|
414
414
|
return value;
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
async function flowByApplication(request) {
|
|
417
|
+
const { esbFlowId, mainTable, operation, moduleSource, employeeId } = request;
|
|
418
|
+
assertPath(ESB_TRIGGER_PATH);
|
|
419
|
+
const session = await getSession();
|
|
420
|
+
const payload = {
|
|
421
|
+
esbFlowId,
|
|
422
|
+
employeeId: employeeId && employeeId.trim() !== '' ? employeeId : session.userId,
|
|
423
|
+
customParams: { mainTable },
|
|
424
|
+
};
|
|
425
|
+
if (moduleSource)
|
|
426
|
+
payload.moduleSource = moduleSource;
|
|
427
|
+
const response = await (await runtime()).requestJson({
|
|
428
|
+
module: 'asset',
|
|
429
|
+
operation,
|
|
430
|
+
method: 'POST',
|
|
431
|
+
path: ESB_TRIGGER_PATH,
|
|
432
|
+
body: payload,
|
|
433
|
+
bigIntStrings: true,
|
|
434
|
+
});
|
|
435
|
+
if (isE10SessionExpiredResponse(response)) {
|
|
436
|
+
throw ziguanjiaAuthError('session_expired', E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
|
|
437
|
+
}
|
|
438
|
+
if (response.parseError) {
|
|
439
|
+
throw ziguanjiaNetworkError('protocol', `接口返回不是合法 JSON(HTTP ${response.status})`, { retryable: false });
|
|
440
|
+
}
|
|
441
|
+
if (response.status < 200 || response.status >= 300) {
|
|
442
|
+
throw ziguanjiaBusinessError('http_error', `ESB 接口 HTTP ${response.status}`, { code: response.status });
|
|
443
|
+
}
|
|
444
|
+
const value = response.value;
|
|
445
|
+
const resultCode = value?.resultCode;
|
|
446
|
+
if (resultCode === undefined) {
|
|
447
|
+
throw ziguanjiaBusinessError('actionflow_no_code', '动作流返回缺少 resultCode', { details: { result: value } });
|
|
448
|
+
}
|
|
449
|
+
if (resultCode !== 200) {
|
|
450
|
+
throw ziguanjiaBusinessError('actionflow_failed', `动作流执行未成功(resultCode=${resultCode}):${value?.resultMsg || ''}`, { code: resultCode, details: { result: value }, retryable: resultCode === 507 || resultCode === 508 || resultCode === 511 });
|
|
451
|
+
}
|
|
452
|
+
return value;
|
|
453
|
+
}
|
|
454
|
+
return { ebuilderRequest, actionFlow, flowByApplication, getSession, resolveFormId, getFormFields, resolveSubcompanyIdByName };
|
|
417
455
|
}
|
|
418
456
|
/**
|
|
419
457
|
* 拼卡片式查看链接 `/sp/ebdfpage/card/0/{表单ID}/{数据ID}`(去域名路径 + 当前环境地址)。
|
|
@@ -258,9 +258,23 @@ export const assetShortcut = {
|
|
|
258
258
|
registerWrite(asset, 'purch', 'asset.purch', '提交采购申请(需 confirm + continuation)');
|
|
259
259
|
registerWrite(asset, 'depre', 'asset.depre', '执行折旧计提(需 confirm + continuation)');
|
|
260
260
|
withJsonInputOptions(asset.command('viewlink')
|
|
261
|
-
.description('构造「查看详情」链接(scene + ids;depre_task 场景用 calc_month)')
|
|
261
|
+
.description('构造「查看详情」链接(scene + ids;depre_task 场景用 calc_month)')
|
|
262
262
|
.action(action(async (ctx, options) => {
|
|
263
263
|
await executeAndPrint(ctx, 'asset.viewlink', await inputFrom(options));
|
|
264
|
-
}));
|
|
264
|
+
})));
|
|
265
|
+
const audit = asset.command('audit').description('资产清查(取数 + 确认表写入,不纳入版本门禁)');
|
|
266
|
+
withJsonInputOptions(audit.command('list')
|
|
267
|
+
.description('分页查询资产清查数据(只读)')
|
|
268
|
+
.option('--cur-page <no>', '页码,从 1 起')
|
|
269
|
+
.option('--max-pages <n>', '最多翻页数(1..100,默认 20)')
|
|
270
|
+
.action(action(async (ctx, options) => {
|
|
271
|
+
const opts = asOptions(options);
|
|
272
|
+
await executeAndPrint(ctx, 'asset.audit.list', await inputFrom(options, {
|
|
273
|
+
cur_page: opts.curPage,
|
|
274
|
+
max_pages: opts.maxPages,
|
|
275
|
+
}));
|
|
276
|
+
})));
|
|
277
|
+
registerWrite(audit, 'confirm', 'asset.audit.confirm', '写入资产清查确认表(需 confirm + continuation)');
|
|
278
|
+
registerWrite(asset, 'report', 'asset.report.apply', '提交资产上报(需 confirm + continuation,moduleSource 固定 AISKILL)');
|
|
265
279
|
},
|
|
266
280
|
};
|